Skip to content

Export Chart Data

Export the active chart's loaded OHLCV data and indicator values to a CSV file. UI only — no public API for CSV export.

Usage

  1. Click the CSV icon in the top bar.
  2. The browser downloads data.csv for that chart.

Exports the chart's current symbol, interval, and loaded bar count.

Configuration

OptionTypeDefaultDescription
chartExportEnabledbooleantrueShow/hide the top-bar CSV export button
typescript
new ChartSpire({
  chartExportEnabled: true,
  // ...
})

See Widget API — Constructor for all options.

Export Contents

OHLCVtimestamp, open, high, low, close, volume (empty if unavailable)

Indicators — One column per numeric output key from active indicators (e.g. dif, rsi1). Columns with no values are omitted.

CSV Format

Header row followed by one row per loaded bar:

timestamp,open,high,low,close,volume,dif,dea,macd
1649962800000,45678.12,46789.45,45234.67,46123.78,12345678,120.5,115.2,5.3

Limitations

  • Exports loaded bars only — scroll back to load more history before exporting.
  • Visual-only indicators excluded: volumeBars, Volume Profile Fixed Range
  • Filename is always data.csv
  • Large datasets may take a moment to download

For chart image export (PNG/JPEG), use Chart API getConvertPictureUrl.