Repository navigation
feat: aggregation grain selector for canvas (AggregationGrainSelector, grain in time_filters) - #10000
Conversation
Extracts the explore "by Day" dropdown into AggregationGrainSelector and shows it in the canvas filter bar and the widget inspector. A widget can set grain on its own in time_filters, on top of the inherited canvas range, and shows it as a read-only chip in its header.
|
The grain picker appears on widgets that don't use it Leaderboards and maps show the new "by Day" dropdown in the inspector, and so do charts without a time axis. None of them use the grain, so picking "by Week" on a leaderboard leaves the data unchanged. It still saves The widget's grain stays when its time range goes back to the canvas If a widget has its own range and grain, say last 24 hours by hour, and the user switches the range back to "Inherit from canvas," the hourly grain stays. On a 7-day canvas range, the widget keeps showing hourly data, though the user meant for it to follow the canvas. Existing YAML with a hand-written |
|
Thanks, both fixed. The picker and header chip now check a A hand-written |
Resolves the overlap with the canvas grain selector (#10000): the adaptive option now lives in the shared AggregationGrainSelector as its default option, used by the explore chart toolbar and the canvas filter bar. The SuperPill no longer renders a grain selector for canvas.
Canvas had grain state and the
grainURL param, but no way to set it once the new range picker became the default: the legacy pill segment that exposed it is gated on the old picker.AggregationGrainSelectorand renders it in the canvas filter bar after the comparison pill. Options come from the current interval and the largest minimum grain, and selecting writes the existinggrainURL param.time_filtersnow acceptsgrainon its own (grain=weekkeeps the canvas range and buckets that widget by week). A grain the canvas range cannot hold falls back to the canvas grain.grainon the canvas data widgets page.Checklist: