chart

Docs › Interaction and export

Export

PNG, SVG and CSV downloads and a data table, with no key or watermark.

The download button at the top right of the card saves a PNG; the ⋯ menu offers PNG, SVG, CSV and the data table (exporting: false hides them). The same is available from code.

Live example

Click the chart or move through it with the keyboard.

Code for this example

const chart = createChart('#chart', {
  type: 'bar',
  title: 'Orders by region',
  data: {
    labels: ['Seoul', 'Gyeonggi', 'Busan', 'Daegu', 'Incheon', 'Gwangju'],
    series: [{ name: 'Orders', data: [4820, 3910, 1640, 1120, 1080, 760] }],
  },
});
log(chart.toCSV());
MethodReturns
chart.toPNG(scale = 2)Promise<Blob>, a 2× PNG for sharp screens
chart.toSVG()A self-contained SVG string with colors resolved (title, legend and annotations included)
chart.toCSV()A CSV string with raw numbers (no units), ready to sum in a spreadsheet
chart.download('png' | 'svg' | 'csv', filename?)Save a file; the title is the default name
  • The CSV opens straight in Excel: a BOM so Korean text reads correctly, a header row (the first column is xAxis.title, or "Label"), dates as local 2026-10-21 (2026-10-21 09:30 when there are times of day) in timeZone, and raw numbers without units, ready to sum.
  • Cells starting with =, + or @ are escaped so they never run as formulas.
  • table: true shows the data table under the chart from the start; it is always there for screen readers.
  • Buttons and tooltips are hidden when printing.
// a PNG for a report e-mail
const blob = await chart.toPNG(2);
const form = new FormData();
form.append('file', blob, 'sales.png');
await fetch('/api/report', { method: 'POST', body: form });