Repository navigation
feat(highcharts): add Highcharts rendering backend - #140
Open
Sam (learningsam20) wants to merge 1 commit into
Open
Sam (learningsam20) wants to merge 1 commit into
Sam (learningsam20) wants to merge 1 commit into
Conversation
Add assembleHighcharts() as a fifth rendering backend alongside Vega-Lite, ECharts, Chart.js, and Plotly. The backend reuses the shared core pipeline (resolveChannelSemantics, computeLayout, filterOverflow) and diverges only at Phase 2 template instantiation. 13 chart templates: Bar, Grouped Bar, Stacked Bar, Line, Area, Scatter, Pie, Doughnut, Histogram, Radar, Heatmap, Waterfall, Sunburst. - highcharts/ assembler, layout application, palette selection - validateChart integration for the highcharts backend - MCP render path via headless Chrome (puppeteer-core) - Site HighchartsView + backend picker entry - Test-data generators registered in TEST_GENERATORS - Generated reference doc (docs/reference-highcharts.md) - Docs: README, DEVELOPMENT, api-reference, adding-a-backend, adding-a-chart-template, test_plan, agent skill
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
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.
Closes #141
What
Adds a
highchartsbackend toflint-js. The same Flint input compiles to a HighchartsoptionviaassembleHighcharts(input)(also exported from the newflint-chart/highchartssubpath).validateChartacceptshighcharts, and both the MCP server and the site editor render it. Followsdocs/adding-a-backend.md; guide:docs/reference-highcharts.md.Why
Flint already targets Vega-Lite, ECharts, Chart.js, Plotly, Excel, and Image-Charts. Highcharts is a widely deployed charting library with a mature, serializable
optionobject, so it is a natural additional compile target for hosts that already ship Highcharts. This lets the same Flint semantic input drive a Highcharts render without a new authoring model.Design / scope
assembleHighchartsbuilds a plainoptionobject; no network, no crypto, no new runtime dependencies. Highcharts stays a peer dependency and is externalized by the build, the same way the other backends treat their renderers.column), line, area, pie/doughnut, scatter, histogram, radar (polar), heatmap, waterfall, and sunburst; datetime axes and per-panel faceting (_facet) are honoured.interaction_specpresets mount:click-highlightdims by series (clicked series stays at full opacity, all others dim), plus the shared legend/navigation presets, using the same admission and warning reporting as the other backends.Chart types (13)
Scatter, Bar, Grouped Bar, Stacked Bar, Histogram, Line, Area, Pie, Doughnut, Sunburst, Radar, Heatmap, Waterfall.
What changed
packages/flint-js/src/highcharts/**:assemble.ts,instantiate-spec.ts,colormap.ts,index.ts,interactive.ts, andtemplates/(bar, line, scatter, pie, radar, histogram, heatmap, waterfall, sunburst, utils).packages/flint-js: barrel +package.jsonexports(./highcharts) + optional peer dependency;tsupexternal;validate/index.tsregisters the backend;interactive/dispatch;test-data/highcharts-tests.ts; tests.packages/flint-mcp:render/highcharts.ts(renders via the Highcharts CDN), render registry,tools/list.ts,tools/schemas.ts, bundled skill asset.site:HighchartsView.tsx,InteractiveHighchartsView.tsx, supported-backends registry, docs catalog, editor.docs: generatedreference-highcharts.mdplus README/DEVELOPMENT/overview/architecture/api-reference/adding-* and the agent skill;scripts/gen-chart-reference.tsextended.CHANGELOG.md: added the Highcharts backend entry.Verification
npm run typecheck— clean (flint-js+flint-mcp, including site types).npm run lint— 0 errors (existing warnings only).npm run test— 1679 passed (flint-js, including the 23 newtests/highcharts-backend.test.tscases and newtests/smoke.test.tsassertions) and 86 passed (flint-mcp).npm run site:build— passes; Highcharts renders in the site gallery and editor.Acceptance checklist (
docs/adding-a-backend.md§6)tests/smoke.test.tspasses for the new assemblernpm run typecheckandnpm run testpass at repo rootsrc/test-data/highcharts-tests.ts, registered inTEST_GENERATORS)Semver
Minor. Adds a backend, a new subpath (
flint-chart/highcharts), an MCP render target, and an optional peer dependency. No breaking changes.Notes
13.1.1insiteandflint-mcp, and theflint-jspeer range is widened to^11.0.0 || ^12.0.0 || ^13.0.0.flint-mcpdoes not bundle Highcharts; the MCP renderer loads it from the Highcharts CDN (code.highcharts.com), so the package keeps its dependency footprint.NODE_OPTIONS=--max-old-space-size=8192forvite build. Bundling the full site (now including Highcharts) exceeded Node's ~4 GB default heap during chunk rendering; CI'snpm run site:buildinherits the setting.