Skip to content

FetchTimeseries: feature clicks to chart-series events - #294

Open
BhattaraiSijan wants to merge 6 commits into
feat/series-chartfrom
feat/fetch-timeseries
Open

FetchTimeseries: feature clicks to chart-series events#294
BhattaraiSijan wants to merge 6 commits into
feat/series-chartfrom
feat/fetch-timeseries

Conversation

@BhattaraiSijan

@BhattaraiSijan BhattaraiSijan commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds FetchTimeseries, a no-UI plugin bridging feature:click to the chart-series contract: on a vector feature click it reads the layer's variables.timeseries block over the bus (layers:getConfig), templates the fetch URL from the clicked feature ({properties.<key>}, {id}, {lon}, {lat} — unresolvable placeholders surface as named errors, not silent no-ops), fetches with abort-on-supersede, normalizes the response, and emits plugin:fetch-timeseries:* events for SeriesChart.

Normalization handles both response shapes the VEDA features API serves under content negotiation — GeoJSON FeatureCollections and flat rows — via loose properties.-prefix path resolution, plus groupBy (one series per parameter), unitKey, and auto-detected time/value keys.

Layers opt in per mission config; clicks on layers without the block do nothing. enabled: false disables without deleting. Charts persist until the next click replaces them (single chartId). The README documents the config schema and a working EPA AQS demo.

Merge order

  1. Emit feature:click on the bus for every vector feature click #292 feature:click core event — merge before this PR (runtime dependency; no compile dependency)
  2. SeriesChart: chart-series contract and single-variable chart plugin #293 SeriesChart (this PR's git base)
  3. this PR

Testing

tests/unit/fetchTimeseries.spec.js (31 cases): config gating incl. enabled:false, URL templating and its error cases, response mapping for both API shapes, grouping/units, payload building. Full unit suite green.

Manual: add the README's timeseries block to the AQS layer in Configure, click a station — loading → chart with the parameter picker. Station 54-39-20 ("Dixie St.") exercises 15 parameters across 5 units.

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.

1 participant