Export a screenshot
Snapshot the chart as PNG or copy to the clipboard — pure-canvas, no external libs.
Chart canvases are first-class image sources. Use the chart handle's
exportPng to snap the canvas as a Blob; from there, download or
copy to the clipboard.
Quick example
How it works
exportPng() reads the chart's offscreen Canvas, scales for
devicePixelRatio, and returns a PNG blob. The function is
synchronous-feeling but returns a Promise to allow for future
worker-side rendering.
Variations
Copy to clipboard
JPEG with custom quality (Phase 1b)
The signature will be exportImage({ format: 'png' | 'jpeg', quality }) —
see reference/roadmap.
API
| Method | Returns |
|---|---|
handle.exportPng() | Promise<Blob> |