Options for Chart.exportSVG.

interface ExportSvgOptions {
    background?: boolean;
    dpr?: 1;
    height?: number;
    width?: number;
}

Properties

background?: boolean

Paint the theme background under the chart. Default true. Off, the document has no ground of its own and takes the colour of whatever page it is placed on, which is what an embedded figure usually wants.

dpr?: 1

The pixel ratio the paint runs at. Only 1 is accepted: SVG has no device pixels, and a renderer asked for 2 would snap its hairlines to half-media- pixel edges that scale as a blur. Named so the option reads the same as the PNG path and a future scaled export has a place to land.

height?: number

Document height in media px. Absent means the live chart height.

width?: number

Document width in media px. Absent means the live chart width. A different size lays the chart out afresh for the export (the same bar spacing over a wider or narrower plot, every scale re-measured for its new height) and puts the live layout back before returning.