Appearance
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
- Click the CSV icon in the top bar.
- The browser downloads
data.csvfor that chart.
Exports the chart's current symbol, interval, and loaded bar count.
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
chartExportEnabled | boolean | true | Show/hide the top-bar CSV export button |
typescript
new ChartSpire({
chartExportEnabled: true,
// ...
})See Widget API — Constructor for all options.
Export Contents
OHLCV — timestamp, 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.3Limitations
- 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.
Related
- Indicators — indicator columns in the export
- Widget API —
chartExportEnabled - Data Access — loading historical data
- Chart API — getConvertPictureUrl — image export