Skip to main content

exportSVG

exportSVG(chart, width?, height?): object

Returns an export of the chart's container. All CSS classes, data-vjs-*** attributes and pointer-events attributes are stripped from the output. Crosshair elements are also removed.

Parameters​

chart​

BaseChart

The chart to export.

width?​

number

Optional width for the output SVG.

height?​

number

Optional height for the output SVG.

Returns​

object

element​

element: SVGElement

extents​

extents: RectangleXY

svg​

svg: string