Documentation

@kanunilabs/datagrid-enterprise


@kanunilabs/datagrid-enterprise / exportChartPng

Function: exportChartPng()

exportChartPng(svg, options?): Promise<void>

Rasterise and download.

The SVG goes through a data URL rather than a blob URL: Safari taints a canvas drawn from a blob-URL image, and a tainted canvas cannot be read back with toBlob — the export would fail there and nowhere else.

Parameters

svg

SVGSVGElement

options?

ChartExportOptions = {}

Returns

Promise<void>