Commit Graph

23 Commits

Author SHA1 Message Date
Brandon Thomas 6405b00cf7 Fix-up: repair test files after merging the conflicting PRs
- restore closing braces the line-level merges of side-by-side tests dropped
- new ChartData literals carry the palette field
- the filter-menu shortcut passes the row with the column
- #688's tab tests account for #851's All Sheets button
- Serbian margins for the ruler-margin labels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 00:34:01 -04:00
Brandon Thomas d9e13a953f Merge main into #808
# Conflicts:
#	ROADMAP.md
2026-10-13 00:08:30 -04:00
Brandon Thomas 7415d3b37d Merge main into #615
# Conflicts:
#	crates/chart/src/tests.rs
2026-10-13 00:07:34 -04:00
Brandon Thomas f075c63207 Merge main into #614
# Conflicts:
#	crates/chart/src/tests.rs
2026-10-13 00:07:31 -04:00
Brandon Thomas 588e289901 Merge main into #585
# Conflicts:
#	crates/chart/src/tests.rs
2026-10-13 00:07:17 -04:00
Brandon Thomas 811a8a139a Fix-up: rustfmt the area-chart label condition after merging the chart PRs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:33:10 -04:00
Brandon Thomas 2f83a04521 Merge pull request #616 from MarekSpodBiedry:issue-542 2026-10-12 23:21:38 -04:00
Brandon Thomas e447fb8c90 Merge pull request #613 from MarekSpodBiedry:issue-545 2026-10-12 23:21:34 -04:00
vangel76 fd53de7c46 Numfmt: TEXT() and chart labels parse each format code once (#806)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 22:09:09 +02:00
MarekSpodBiedry 91873e03eb Draw data labels on area and stacked area charts (#545) 2026-10-12 08:38:28 +02:00
MarekSpodBiedry 389c539da4 Honour the gridlines flag on box-and-whisker and stock charts (#543) 2026-10-12 08:36:18 +02:00
MarekSpodBiedry 5fb854be9c Chart: color pie, doughnut, treemap and sunburst points from the workbook theme (#579) 2026-10-12 08:36:14 +02:00
MarekSpodBiedry 3301d59f44 Fix histogram counts disagreeing with interval labels on bin boundaries (#546) 2026-10-12 08:35:31 +02:00
MarekSpodBiedry d64b30b3a4 Funnel chart: hide value labels when data labels are off (#544) 2026-10-12 08:29:56 +02:00
MarekSpodBiedry 30fe8c4cae Fix chart rasterizer panic on negative rectangle extents (#542) 2026-10-12 08:29:48 +02:00
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
vangel76 1a7c16eb9a Charts: PivotCharts (insert.pivotChart) (#311)
A chart linked to a PivotTable: series are built from the report
(innermost row items x column items/value fields, totals excluded) and
rebuilt on every refresh or layout change; c:pivotSource round trip;
chart series accept union references.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:31:49 +02:00
Brandon Thomas bd1be73f2d Merge pull request #62 from justinjohn0306/fix/smooth-line-charts
Line charts: smooth (spline) curves (issue #52)

# Conflicts:
#	crates/xlsx/src/tests/mod.rs
2026-10-10 13:17:07 -04:00
Brandon Thomas c975b5dc75 Review fix-up: uniform, plot-clamped spline smoothing
smooth_run gives every segment the same number of sub-segments (cap / n, 1..100) so long
series are smoothed end to end within the point cap, and clamps the Catmull-Rom curve to
the plot box. List "smooth" in chart.addElement's params doc, drop the smooth_demo
example, and use the test sheet's own name in series refs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:21:35 -04:00
nihilist-narwhal bf1381253f Charts: scatter and bubble charts with text X values number the points
A scatter or bubble chart whose X values are text (a first column of
labels) drew no points, as none of its X values were numbers. Like
Excel, such X values are now ignored and the points numbered 1..n.
2026-10-09 23:31:26 -05:00
justinjohn0306 69709bd458 Line charts: smooth (spline) curves (issue #52)
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.
2026-10-10 00:09:12 +05:30
Brandon Thomas 488e12de31 Rename SheetCraft to GridCraft everywhere (crates, apps, bundle ids, packaging, docs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:39:08 -04:00
Brandon Thomas beb353943e M1: Excel-style egui UI, desktop app, chart renderer, MCP server, CLI, release packaging
- ui-egui: title bar with QAT, full ribbon (Home/Insert/Draw/Page Layout/Formulas/Data/
  Review/View/Automate + Table/Chart Design), formula bar with Name Box, virtualised grid
  (frozen panes, overflow, borders, CF data bars/scales/icons, tables, sparklines, filter
  buttons, charts/pictures/shapes), in-cell editor with point mode, reference colouring,
  autocomplete and argument hints, sheet tabs, status bar, dialogs, control channel
- apps/sheetcraft: desktop app (control server, file dialogs, prefs, drag & drop)
- chart: toolkit-free chart layout/rendering for 25 chart kinds + sparklines + rasteriser
- mcp + sheetcraft-cli: MCP server (headless or bridged) and CLI (info/convert/eval/cat/run/mcp)
- xtask (ci/layers/assets/wasm/version/parity), release workflows, packaging, placeholder icon
- automatic row heights

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:00:15 -04:00