Documentation

@kanunilabs/datagrid-enterprise


@kanunilabs/datagrid-enterprise / ChartImageOptions

Interface: ChartImageOptions

What the image calls take on top of ChartExportOptions.

Extends

Properties

background?

optional background?: string | null

Background colour. Charts are transparent, and a transparent PNG dropped into a dark viewer or a slide deck loses every dark label on it. Pass null to keep transparency deliberately.

Inherited from

ChartExportOptions.background


fileName?

optional fileName?: string

File name without extension. Default 'chart'.

Inherited from

ChartExportOptions.fileName


height?

optional height?: number


pixelRatio?

optional pixelRatio?: number

PNG pixel ratio. Default 2 — a chart exported at CSS pixels looks soft the moment it lands in a document, and 2× is the cheapest fix.

Inherited from

ChartExportOptions.pixelRatio


quality?

optional quality?: number

JPEG quality, 0–1. Default 0.92.


title?

optional title?: string

A title drawn above the chart in the file. The panel shows the title as page text, outside the SVG, so without this an exported chart lost it.

Inherited from

ChartExportOptions.title


type?

optional type?: "png" | "jpeg"

'png' (default) or 'jpeg'. JPEG has no transparency, so a null background is drawn white there rather than black.


width?

optional width?: number

The image's size in CSS pixels (the file is pixelRatio times larger). The chart is vector, so it scales without blurring. One side alone keeps the chart's proportions; both fix the box, and the chart is centred in it at its own proportions — stretched to fit, every label would be distorted.