mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-26 19:56:48 -06:00
Add support for Excel's "smoothed line" chart style. The smooth flag flows model -> resolve -> chart render, persists through XLSX (<c:smooth val="1"/>), and is toggled via the chart.addElement "smooth" element. Rendering interpolates each gap-free run with a uniform Catmull-Rom spline (0.5 tangent scale, 100 sub-segments per data segment), so the curve passes through every data point and rounds the vertices — matching Excel's observed behaviour. Long runs are still decimated before smoothing. - model: Series.smooth (#[serde(default)], so old workbooks load unchanged) - chart: SeriesData.smooth; smooth_run + catmull in render; wired through resolve and the sanitize() copy; draw_runs takes the flag (line + scatter) - engine: chart.addElement element="smooth" - xlsx: read/write <c:smooth val> instead of hard-coding val="0" - tests: smooth_line_adds_interpolated_points_and_keeps_endpoints, smooth_line_splits_at_gaps, smooth_line_setting_round_trips - examples/smooth_demo.rs: generates a straight+smooth side-by-side workbook cargo xtask ci: all 7 steps pass.