SeriesChart: chart-series contract and single-variable chart plugin - #293
Open
BhattaraiSijan wants to merge 7 commits into
Open
SeriesChart: chart-series contract and single-variable chart plugin#293BhattaraiSijan wants to merge 7 commits into
BhattaraiSijan wants to merge 7 commits into
Conversation
This was referenced Aug 10, 2026
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.
Summary
Adds the shared chart-series contract (
src/essence/Tools/_shared/types/chartSeries.ts) and SeriesChart, a generic chart panel rendering it. SeriesChart knows nothing about data sources: any plugin listed in itssourcestool variable that emitsplugin:<id>:seriesLoading/seriesReady/seriesError/seriesClearedgets a chart card perchartId— loading, error, and ready states included. Payloads are treated as untrusted: malformed ones warn and drop rather than crash the panel.Rendering (ECharts, already a dependency): one variable visible at a time (air-quality-domain convention, e.g. OpenAQ), with the single-select legend as the parameter picker — the y-axis renames to the picked variable's unit. Wheel + slider zoom (slim theme-primary scrubber), reset button in the card header, crosshair tooltips. All time labels are UTC by design: epoch-value axis with our own formatters, since ECharts' native time axis renders viewer-local. All colors route through
--theme-*tokens (canvas via a resolved theme object; spec-asserted so literals can't regress in).The default
sources: ["fetch-timeseries"]forward-references the fetcher plugin from the stacked PR — inert until it merges.Size note: ~360 lines are unit tests and ~230 are styles/config/docs; reviewable logic is ~600 (
chartData.ts, panel, adapter).Merge order
feature:clickcore event (independent of this one)developmentTesting
Contract guards and option-builder covered by
tests/unit/chartSeries.spec.js+tests/unit/seriesChartData.spec.js(UTC handling, single-select legend, unit-named axis, themed scrubber, tooltip formatting). Full unit suite green. Manual recipe lives in the stacked FetchTimeseries PR, which provides the first emitter.