Create Visual Components
These operations instantiate new visual elements.
msc.layout(type, params)
Creates a layout.
type: layout typeparams(Object): contains layout properties- Return type: Layout
msc.gradient(type, params)
Creates a gradient to use as a stroke or fill color.
type(String):"linear"(default) for a LinearGradient, or"path"for a PathGradientparams:- for
"linear"(Object): containsx1,y1,x2, andy2properties - for
"path"(Array): a sequence of colors, one per vertex of the mark it’s assigned to
- for
- Return type: LinearGradient or PathGradient
scene.mark(type, params)
msc.renderer(type, domId)
Creates a renderer.
type(String): type of renderer; possible values are"svg"and"webgl"domId(String): ID of the SVG or Canvas element- Return type: Renderer
msc.scene(params)
Creates a scene.
params(Object, optional):fillColor: background color of the scene
- Return type: Scene