The chart time range system supports preset and custom ranges, per-chart overrides, global application, URL persistence, and local preference persistence.
1H24H7D30D1Y
tr_apply_global—1or0tr_global— serialized global selectiontr_chart_<chartId>— serialized per-chart selection
Serialization format:
- Preset:
preset|24H - Custom:
custom|2026-04-01T00:00:00.000Z|2026-04-20T00:00:00.000Z
Stored in localStorage key:
bridgewatch.timeRanges.v1
State persisted:
applyGloballyglobalSelectionchartSelectionslastSelection
Utilities in frontend/src/utils/timeRange.ts:
TIME_RANGE_PRESETSfilterSeriesByTimeRange()formatRangeLabel()serializeTimeRangeSelection()deserializeTimeRangeSelection()
Provider in frontend/src/hooks/useTimeRange.tsx:
TimeRangeProvideruseTimeRange()
UI components in frontend/src/components/TimeRangeSelector/:
TimeRangeSelectorDateRangePicker
<TimeRangeSelector chartId="price-USDC" title="Price chart range" />
<PriceChart chartId="price-USDC" ... />The selector and chart share chartId, allowing per-chart or global filtering.