[WIP] Excel and Plotly backend, and enhanced control#71
Open
Chenglong-MS wants to merge 19 commits into
Open
Conversation
Port the Bump template to the Chart.js backend, mirroring the ECharts implementation (ecBumpChartDef): line-with-points per series over a shared x axis, with the rank axis reversed so rank 1 sits on top. Chart.js reverses a linear scale in place (reverse: true), so unlike the ECharts category-index workaround the series keep their real rank values and the config stays pure JSON with no tooltip formatter. Rank detection mirrors the shared rule (Rank/Score/Level semantic on y and not on x); non-rank inputs fall back to a plain value axis with the semantic zero decision, like the Line template. Discrete/temporal/ linear x handling and the continuous-extent pinning follow line.ts. - register in cjsTemplateDefs (Line & Area group, same position as ECharts) - tests: 6 cases (registry, datasets shape, reversed rank axis pinned to [1, maxRank], non-rank fallback, JSON round-trip purity, 3-backend parity) - docs: regenerate reference-chartjs.md; add Bump to the SKILL.md Chart.js coverage list (+ synced bundled asset) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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(chartjs): add Bump Chart template
feat(plotly): add Plotly backend with the four acceptance templates
Flint excel
…e validation' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…e validation' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates documentation across the project to clarify and expand on several major areas: it adds complete documentation for the new Plotly backend and Excel backend, improves the explanation of layout and overflow handling (including band sizing and elastic axis budgets), and updates release notes to better describe new features and improvements. It also refines the documentation for backend-specific chart support and font scaling options.
Major documentation updates:
Plotly backend documentation:
Excel backend documentation:
ExcelNativeChartSpec), and how it integrates with Office.js for rendering. Also updated the codebase structure to include the Excel backend and its test harness. [1] [2]Layout and axis sizing improvements:
Overflow and band sizing:
Font scaling options:
baseLabelFontSize,baseTitleFontSize) and how fonts adapt to canvas size across backends.Other documentation and release note improvements:
These updates make the documentation more comprehensive, accurate, and accessible for both end users and developers.