View as Markdown

API reference: @salmonui/charts/pie-chart

AccumulationApitype

import type { AccumulationApi } from '@salmonui/charts/pie-chart';
type AccumulationApi = VizInstance;

Instance passed to ref.

AccumulationApi members (7, 7 inherited)
NameSignatureDescription
elementinheritedelement: HTMLElement | null;

The root <figure> (null before mount).

exportinheritedexport: (options?: VizExportOptions | undefined) => Promise<void>;

Downloads the visualization; settles after the download starts.

toBlobinheritedtoBlob: (format?: ImageFormat | undefined) => Promise<Blob>;
toDataURLinheritedtoDataURL: (format?: ImageFormat | undefined) => Promise<string>;
toSVGStringinheritedtoSVGString: () => string;

The drawn SVG markup with xmlns, synchronously; theme colors stay var(--salmon-*) references. toBlob('svg') is the standalone file with colors resolved. Empty before mount.

printinheritedprint: () => Promise<void>;
focusinheritedfocus: () => void;

Focuses the plot (the one tab stop).