gridcraft/crates/chart/src
neilcawse 8ea2342703 Charts: read, write and draw trendlines
Model: Series.trendlines (Vec<Trendline>, serde default) with kind
(linear, exponential, logarithmic, polynomial 2..6, power, moving
average 2..255), name, forward/backward forecast, set intercept,
equation / R² display and line colour, width and dash.

XLSX: read and write <c:trendline> in CT_Trendline child order, placed
after dLbls and before the data references in line, bar, area, scatter,
bubble and stock series; unknown types are skipped.

Chart: least-squares fits (transformed for exp/log/power, skipping
non-positive values; polynomials via normal equations on centred,
scaled x with partial pivoting), moving averages, forecasts that widen
the category or x axis, clipping to the plot, equation and R² labels and
legend entries ("Linear (Sales)"). Degenerate data draws nothing.

Engine: chart.addElement element="trendline" adds (type, series, order,
period, forward, backward, displayEquation, displayRSquared) or removes
trendlines; document.inspect lists each chart's trendlines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:39:31 -04:00
..
axis.rs Rename SheetCraft to GridCraft everywhere (crates, apps, bundle ids, packaging, docs) 2026-10-06 01:39:08 -04:00
lib.rs Charts: read, write and draw trendlines 2026-10-11 16:39:31 -04:00
raster.rs M1: Excel-style egui UI, desktop app, chart renderer, MCP server, CLI, release packaging 2026-10-06 00:00:15 -04:00
render.rs Charts: read, write and draw trendlines 2026-10-11 16:39:31 -04:00
resolve.rs Charts: read, write and draw trendlines 2026-10-11 16:39:31 -04:00
sparkline.rs Rename SheetCraft to GridCraft everywhere (crates, apps, bundle ids, packaging, docs) 2026-10-06 01:39:08 -04:00
tests.rs Charts: read, write and draw trendlines 2026-10-11 16:39:31 -04:00
trend.rs Charts: read, write and draw trendlines 2026-10-11 16:39:31 -04:00