SeriesChart: chart-series contract and single-variable chart plugin - #293
Open
BhattaraiSijan wants to merge 11 commits into
Open
SeriesChart: chart-series contract and single-variable chart plugin#293BhattaraiSijan wants to merge 11 commits into
BhattaraiSijan wants to merge 11 commits into
Conversation
This was referenced Aug 10, 2026
…sible variable Large payloads no longer overflow the arg-spread extent (crashed past ~130k points); a bad render costs its card, not the panel; time tick granularity follows the picked variable instead of the union of all series. Also: space-separated timezone-less datetimes parse as UTC, CSV quotes lone CRs, one token list feeds both color paths, dead surface/default-export/slider-remap removed.
seriesReady is now flat like its three siblings (SeriesReadyPayload exported; the enveloped form is dropped with a warning, spec-pinned). The guard rejects duplicate series ids/labels that broke the single-select picker. Dual-y-axis promises removed, reserved payload fields marked, layout descriptions corrected, explicitly-empty sources disables all subscriptions.
The tool shipped on:false and unassigned to any panel, so the loader never mounted it. Now on and in the float-analysis panel next to Chart. FetchTimeseries' enable lands with its own PR.
BhattaraiSijan
added a commit
that referenced
this pull request
Aug 24, 2026
seriesReady drops its envelope to match the #293 contract. Fetches time out after 30s; destroy() emits seriesCleared so no spinner or stale card is stranded (the contract's first real seriesCleared emitter); the async click handler is caught and layers:getConfig goes through a hasHandler-guarded typed wrapper, so clicks during mission load are silent no-ops instead of unhandled rejections. First tests for the tool's I/O layer (mock bus + fetch): supersede, timeout, teardown, HTTP/template errors.
BhattaraiSijan
added a commit
that referenced
this pull request
Aug 24, 2026
on:true in the profile, plus metadata startHidden/modernLayoutSupport so the no-UI tool loads and subscribes without rendering a blank tool card. With #293's enable, the end-to-end click-to-chart path now runs from a clean checkout. Config descriptions corrected alongside.
Collaborator
Author
|
Addressed the review findings on this PR:
|
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.