Repository navigation
FetchTimeseries: a series cadence, and range pickers that step at it - #579
Merged
Merged
Conversation
sandesh-sp
approved these changes
Oct 19, 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
A layer's time series does not always run at the layer's own cadence. On Air4US every AQS layer declares
time.interval: PT1Hfor its hourly map tables, while its time series is drawn from the daily tables. The range card's pickers were hardcoded to the hour for everyone, so a daily series offered a clock that meant nothing (the Air4US review asked for the hour to go).The timeseries block now declares its own Cadence:
hour(the default, today's behavior),day,monthoryear, authored in Configure's Timeseries row next to Default Range. The card's Start and End pickers step at it, using the Timeline DateSelector's matching mode. A picked Start opens its step and a picked End closes it, so a day runsT00:00:00toT23:59:59, a month its first to its last day, a year Jan 1 to Dec 31; End never passes its ceiling (today). Hour mode is unchanged: picks to the minute,…:00and…:59. An unreadable value warns and keeps the hour picker, as an unreadable Default Range does.This is the first of two slices. The second carries the cadence in the chart-series payload so the chart's tooltip and zoom-window labels print at the same precision, replacing the date-only tooltip from #569.
What's in the diff
FetchTimeseries/lib/timeseries.ts:cadence?onTimeseriesConfig;parseCadence,cadenceStart,cadenceEnd,DEFAULT_TIME_MODE.FetchTimeseries/FetchTimeseriesTool.tsx: the mode is read where the range is seeded for a layer and handed to the card.FetchTimeseries/lib/components/RangeCard.tsx:timeModeprop, passed to both pickers; picks open and close their step.configure/src/metaconfigs/layer-vector-config.json,layer-vectortile-config.json: a "Cadence" dropdown after "Default Range".FetchTimeseries/README.md.fetchTimeseries.spec.js(parseCadence, step open and close for the four modes, year end),fetchTimeseriesTool.spec.js(day cadence shows days and runs picks over whole days; month cadence runs 1st to last and caps at today; unreadable cadence warns and keeps the hour picker).Testing
npm run test:unitgreen (210 files, 3600 tests) andtsc --noEmitclean.Sep 25, 2025, no clock). Pick a Start day: the request filter readsdatetime >= '<day>T00:00:00'. Pick an End day:datetime <= '<day>T23:59:59'. Set Cadence to "month": the pickers showSeptember 2026, and End picked as the current month stops at today.Not in this PR
2025-09-25, shown asSep 2025, until the first pick.cadence: day.🤖 Generated with Claude Code