Skip to content

Flint excel - #70

Merged
Chenglong-MS merged 9 commits into
devfrom
flint-excel
Jul 22, 2026
Merged

Flint excel#70
Chenglong-MS merged 9 commits into
devfrom
flint-excel

Conversation

@Chenglong-MS

Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements to the Flint charting library, focusing on overflow handling, documentation clarity, and backend extensibility. The main changes include a redesigned default overflow strategy to prioritize display order, enhanced documentation and release notes, and the addition of new backend support for Excel and Plotly. A new Donut Chart is also documented for the Vega-Lite backend.

Overflow handling improvements:

  • The default overflow strategy in filter-overflow.ts now prioritizes display order: user-specified sort, canonical semantic order, numeric order, and finally data encounter order. This removes implicit measure-based top-N ranking and aligns truncation with what the user sees. [1] [2] [3] [4] [5]
  • Updated warning messages to clarify that omitted values are those not shown in the first N of the sort order.

Documentation and release notes:

  • Updated documentation in README.md and architecture.md to clarify overflow strategy, add migration notes, and describe the new Excel backend, including its architecture and integration. [1] [2] [3] [4] [5] [6] [7]
  • Improved the 0.3.0 release notes for clarity and detail, highlighting new features and changes.

Backend extensibility:

  • Added Excel and Plotly as new backend exports in flint-js/package.json, along with their peer dependencies and optional dependency declarations. [1] [2] [3]

Vega-Lite backend updates:

  • Documented the addition of a Donut Chart as the 35th supported chart type, including its encoding channels and options. [1] [2]

These changes improve the user experience for overflow handling, expand backend support, and enhance documentation for both users and developers.

zl190 and others added 9 commits July 18, 2026 23:04
Add a fourth rendering backend per docs/adding-a-backend.md: an
assemblePlotly orchestrator reusing the shared core pipeline
(Phase 0 semantics / Phase 1 layout), diverging only at Phase 2 to
emit Plotly figures ({ data: traces[], layout }). Figures are pure
JSON — temporal axes use Plotly's native date axis instead of tick
callbacks, so compiled specs survive serialization.

First-merge scope (§6 acceptance): Bar, Line, Area, Scatter templates
mirroring the Chart.js templates' decisions (category order, zero
baseline, color grouping, horizontal bar transposition, interpolate /
opacity / stackMode / showPoints properties). column/row facet
encodings are dropped with an 'unsupported-channel' warning; subplot
grids are a follow-up.

Wiring per §4: barrel export, tsup entry, ./plotly subpath export,
plotly.js as an optional peerDependency (mirrors chart.js), smoke
test, and tests/plotly-backend.test.ts (10 cases incl. a recursive
no-functions JSON-purity check).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PlotlyView (plotly.js-dist-min, designed-size wrapper mirroring
ChartjsView), a BACKENDS adapter entry, and the per-view dispatch
lines in WallChart / TripleChart / DocChart. Editor output language
and ChartWall result names gain their 'plotly' entries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Facets: column/row encodings render as a subplot grid (facet.ts) —
per-panel axis pairs with explicit domains, mirroring the Chart.js
backend's facet decisions: shared nice-rounded y-domain, y tick
labels and title on the leftmost column only, column-only wrapping
from the shared facet budget, column headers above panels. Row
headers sit on the right (Vega-Lite style) because the left edge is
occupied by y labels in a single combined figure; x-axis titles show
on the bottom row only for the same reason. The first-merge
'unsupported-channel' warning path is gone — all four templates now
declare column/row.

Colors: colormap.ts mirrors chartjs/colormap.ts — core color
decisions (schemeType / schemeId / categoryCount) pick from
Plotly-native palettes (plotly10 / light24 qualitative, viridis
sequential, RdBu diverging); templates thread the resolved palette
instead of indexing the default colorway directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
genPlotlyCoreTests (four templates, color on/off, horizontal bar) and
genPlotlyFacetTests (column / row / column-row grid), registered as
'Plotly: Core Templates' and 'Plotly: Facets' in TEST_GENERATORS per
the adding-a-chart-template §4 generator pattern. The backend test
file grows facet-grid assertions (axis pairs, shared range,
leftmost-only labels, header annotations, legend dedupe), a
diverging-vs-categorical scheme pick, a generator round-trip that
assembles every dedicated case, and keeps the JSON-purity check over
a facet figure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Regenerate package-lock.json from origin/dev and re-add just the
plotly entries (plotly.js-dist-min package + site dependency,
plotly.js peerDependency + peerDependenciesMeta), dropping the
unrelated peer-flag churn a full npm install had introduced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(plotly): add Plotly backend with the four acceptance templates
@Chenglong-MS
Chenglong-MS changed the base branch from main to dev July 22, 2026 06:02
@Chenglong-MS
Chenglong-MS merged commit 319206d into dev Jul 22, 2026
6 checks passed
@Chenglong-MS
Chenglong-MS deleted the flint-excel branch July 22, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants