Repository navigation
SeriesChart: tooltip and window dates print at the series cadence - #581
Open
BhattaraiSijan wants to merge 1 commit into
Open
BhattaraiSijan wants to merge 1 commit into
BhattaraiSijan wants to merge 1 commit into
Conversation
BhattaraiSijan
force-pushed
the
feat/timeseries-cadence-chart
branch
from
October 19, 2026 16:15
4d15778 to
7aa3e2a
Compare
BhattaraiSijan
changed the base branch from
feat/timeseries-cadence
to
development
October 19, 2026 16:15
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.
Summary
Second half of the series cadence (#579). That PR declares the cadence in the layer's timeseries block and makes the range pickers step at it. The chart still printed every time as a date only, hardcoded in #569 for the daily Air4US series, so an hourly series lost its clock and a monthly one showed a day that meant nothing.
The cadence now travels on the chart-series payload, and the chart prints the tooltip title and the zoom window's end dates at that precision:
Feb 28, 2026, 14:00for hour,Feb 28, 2026for day,Feb 2026for month,2026for year. A payload without one prints the date, today's behavior. Axis ticks are untouched.FetchTimeseries sends
cadenceonly when the layer declares a readable one. An unset layer keeps both of today's defaults, hourly pickers and a date-only chart, rather than switching the chart to clocks.What's in the diff
_shared/types/chartSeries.ts:ChartCadenceandcadence?on the payload; the guard rejects a value outside the four words, like any other malformed payload.FetchTimeseries/lib/timeseries.ts:buildPayloadcopies the parsed config cadence onto the payload, lowercased, when there is one.SeriesChart/lib/chartData.ts:formatTooltipTime(ms, cadence)over one formatter per cadence;buildChartandbuildChartOptiontake the cadence and hand it to the tooltip and the window labels.SeriesChart/lib/components/SeriesChartPanel.tsx: the canvas receivespayload.cadence.chartSeries.spec.js(accepted word, rejected word),seriesChartData.spec.js(each cadence's format, the hourly tooltip title, window dates by month and by hour),fetchTimeseries.spec.js(declared cadence rides, unreadable or absent is not sent),fetchTimeseriesTool.spec.js(the emitted payload carries it, and nothing when unset).Merge order
Stacked on #579 and targets its branch; retarget to development once #579 merges. Independent of the CSV name PR, though both touch
chartData.tsand the panel on nearby lines, so whichever lands second gets a small rebase.Testing
npm run test:unitgreen (210 files, 3602 tests) andtsc --noEmitclean.Feb 28, 2026and date-only window labels, as today. Set Cadence to "hour", save, reload, press again: the tooltip readsFeb 28, 2026, 00:00and the window labels carry the clock. Set it to "month":Feb 2026.Not in this PR
🤖 Generated with Claude Code