Reuse the stock-chart CSV parser (same format, same sample file):
IndicatorWidget::populate_from_csv / Widget::load_csv_data replace
the demo bars and the lines recompute from the loaded series at draw
time, so no per-kind wiring was needed. Adds csv::bars_from_rows +
date_to_epoch_nanos (Bar::time is nanoseconds; this also makes the
four pivot widgets compute real lines instead of all-NaN). Demo
series stays as fallback (reset_to_demo, loaded_from_csv flag).
Tests: 9 new (all-250 load + recompute + headless draw, pivot fix,
bad-CSV keeps demo bars); full workspace suite clean except the
pre-existing lightgui-gen fixture failure. Screenshots: 250/250
CSV-loaded renders under Xvfb differ from demo goldens (RMSE
0.0060-0.0661). Docs: docs/indicators-csv.md; rustdoc Ind* pages
updated.
- New csv.rs: parse_ohlcv_csv (date,open,high,low,close[,volume],
header optional, errors name the line) + derived series (VWAP, OBV,
accumulation/distribution, money flow, Heikin-Ashi, Renko, volume
profile).
- XGraph: load_*_csv loaders (candles, OHLC bars, close line, indexed
closes, VWAP over candles, OBV, A/D, money flow, Heikin-Ashi, Renko,
volume bars/candles/profile), add_ohlc_csv + add_ratio_line /
add_spread_line for two-symbol compare, clear_data, SeriesKind::Bars
(volume bars from the zero line; y range forced to contain 0).
- ChartWidget::populate_from_csv picks the series per kind; the 14
drawing/annotation kinds reject CSV with an error. Widget trait gains
load_csv_data (default: rejects); XGraph loads candles.
- xframe-demo: run_widget_with_csv + --csv flag; csv-chart-shots
example renders all 23 kinds headlessly and diffs vs the blank
template; 30-row sample CSV in examples/data/.
- docs/stock-charts-csv.md: audit (no template data ships inside the
widget), CSV spec, per-kind table, worked examples, limits. Also
corrects the stale gen.rs comment about a seeded preview series.
- 13 new tests in csv_tests.rs (parser, derived math, per-kind
population, clear/populate, ratio/spread, headless renders).