Skip to content

fix(dashboards): Rebalance chart interval options and defaults#112562

Merged
gggritso merged 2 commits intomasterfrom
georgegritsouk/dain-1376-default-interval-on-dashboard-pages-when-selecting-time
Apr 13, 2026
Merged

fix(dashboards): Rebalance chart interval options and defaults#112562
gggritso merged 2 commits intomasterfrom
georgegritsouk/dain-1376-default-interval-on-dashboard-pages-when-selecting-time

Conversation

@gggritso
Copy link
Copy Markdown
Member

@gggritso gggritso commented Apr 9, 2026

Rebalance chart interval ladders and default strategy on dashboards to reduce data point counts and improve chart smoothness. Awaiting #112678

See DAIN-1376 for full context and audit.

tl;dr the current behaviour is: give everyone 3-4 options for the interval, always default to the highest granularity. This causes much jank, since so much data is loading! What we think we want to do is choose the second highest granularity by default, but in many cases that's not enough points.

In this PR I both switch to using the second-highest granularity by default (in Dashboards, not Explore), and also re-balance the options so things are a bit more even. It's a bit of science and a bit of art, but the results should be pretty decent!

Before

Duration Range 1m 5m 15m 30m 1h 3h 12h 1d
1h–6h 60–359 12–71 4–23 - - - - -
6h–48h - 72–575 24–191 12–95 6–47 - - -
48h–7d - - 192–671 96–335 48–167 16–55 - -
7d–14d - - - 336–671 168–335 56–111 14–27 -
14d–30d - - - - 336–719 112–239 28–59 14–29
30d–90d - - - - - 240–720 60–180 30–90

Defaults (bold) hit 575–720 points at the upper end of every band, which is an awful lot of points to show by default.

After

Duration Range 1m 5m 10m 30m 1h 3h 6h 12h
1h–6h 60–359 12–71 - - - - - -
6h–12h 360–719 72–143 36–71 - - - - -
12h–2d - 144–575 72–287 24–95 - - - -
2d–4d - - 288–575 96–191 48–95 - - -
4d–14d - - - 192–671 96–335 32–111 - -
14d–30d - - - - 336–719 112–239 56–119 -
30d–90d - - - - - 240–720 120–360 60–180

Defaults (bold) stay in the 60–360 range. High granularity is still available for those who want it.

Changes

  • Replace 15m with 10m, add 6h, remove 1d from interval options
  • Rebalance MINIMUM/MAXIMUM ladders with new thresholds at 12h, 2d, 4d
  • Default to second-biggest interval on dashboards (USE_SECOND_BIGGEST), keep Explore using the highest granularity by default
  • 1h–6h band naturally defaults to 1m (finest) since it only has 2 options

Refs DAIN-1376

Replace 15m with 10m, add 6h, and remove 1d from interval options to
create a more even step progression (alternating 2x/3x multipliers).
Rebalance MINIMUM and MAXIMUM interval ladders with new thresholds at
12h, 2d, and 4d for tighter duration bands. Default to second-biggest
interval on dashboards so charts are smooth out of the box while still
offering a hyper-granular option for power users.

Previously, 90d at 3h produced 720 data points per chart, causing UI
jank and moiré artifacts on bar charts. Now defaults stay in the
60–360 range across all durations.

Refs DAIN-1376
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 9, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 9, 2026
Consolidate the three dashboard useChartInterval call sites into a
single wrapper hook that hardcodes USE_SECOND_BIGGEST strategy. This
prevents detail.tsx, widgetPreview.tsx, and filtersBar.tsx from going
out of sync. Also fixes filtersBar.tsx which was previously using the
default USE_SMALLEST strategy instead of USE_SECOND_BIGGEST.
@gggritso gggritso marked this pull request as ready for review April 13, 2026 15:11
@gggritso gggritso requested review from a team as code owners April 13, 2026 15:11
@gggritso gggritso merged commit b621c32 into master Apr 13, 2026
66 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-1376-default-interval-on-dashboard-pages-when-selecting-time branch April 13, 2026 18:34
wedamija pushed a commit that referenced this pull request Apr 13, 2026
Rebalance chart interval ladders and default strategy on dashboards to
reduce data point counts and improve chart smoothness. Awaiting
#112678

See [DAIN-1376](https://linear.app/getsentry/issue/DAIN-1376) for full
context and audit.

tl;dr the current behaviour is: give everyone 3-4 options for the
interval, always default to the highest granularity. This causes much
jank, since so much data is loading! What we think we want to do is
choose the _second_ highest granularity by default, but in many cases
that's not enough points.

In this PR I both switch to using the second-highest granularity by
default (in Dashboards, not Explore), and also re-balance the options so
things are a bit more even. It's a bit of science and a bit of art, but
the results should be pretty decent!

### Before

| Duration Range | 1m | 5m | 15m | 30m | 1h | 3h | 12h | 1d |
|---|---|---|---|---|---|---|---|---|
| **1h–6h** | **60–359** | 12–71 | 4–23 | - | - | - | - | - |
| **6h–48h** | - | **72–575** | 24–191 | 12–95 | 6–47 | - | - | - |
| **48h–7d** | - | - | **192–671** | 96–335 | 48–167 | 16–55 | - | - |
| **7d–14d** | - | - | - | **336–671** | 168–335 | 56–111 | 14–27 | - |
| **14d–30d** | - | - | - | - | **336–719** | 112–239 | 28–59 | 14–29 |
| **30d–90d** | - | - | - | - | - | **240–720** | 60–180 | 30–90 |

Defaults (bold) hit 575–720 points at the upper end of every band, which
is an awful lot of points to show by default.

### After

| Duration Range | 1m | 5m | 10m | 30m | 1h | 3h | 6h | 12h |
|---|---|---|---|---|---|---|---|---|
| **1h–6h** | **60–359** | 12–71 | - | - | - | - | - | - |
| **6h–12h** | *360–719* | **72–143** | 36–71 | - | - | - | - | - |
| **12h–2d** | - | *144–575* | **72–287** | 24–95 | - | - | - | - |
| **2d–4d** | - | - | *288–575* | **96–191** | 48–95 | - | - | - |
| **4d–14d** | - | - | - | *192–671* | **96–335** | 32–111 | - | - |
| **14d–30d** | - | - | - | - | *336–719* | **112–239** | 56–119 | - |
| **30d–90d** | - | - | - | - | - | *240–720* | **120–360** | 60–180 |

Defaults (bold) stay in the 60–360 range. High granularity is still
available for those who want it.

### Changes
- Replace `15m` with `10m`, add `6h`, remove `1d` from interval options
- Rebalance MINIMUM/MAXIMUM ladders with new thresholds at 12h, 2d, 4d
- Default to second-biggest interval on dashboards
(`USE_SECOND_BIGGEST`), keep Explore using the highest granularity by
default
- 1h–6h band naturally defaults to 1m (finest) since it only has 2
options

Refs DAIN-1376

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
gggritso added a commit that referenced this pull request Apr 14, 2026
The interval rebalancing in #112562 removed the 1d bucket option.
Add it back as an extra option appended to the dropdown for durations
of 14 days or more, without changing the ladder-derived defaults.

Refs DAIN-1511
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gggritso added a commit that referenced this pull request Apr 14, 2026
…12919)

Add a "1 day" bucket option to the interval dropdown in Explore and
Dashboards for time ranges of 14 days or more.

The interval rebalancing in #112562 removed the `1d` option. This was
flagged by user feedback — for longer time ranges, daily bucketing is a
natural and useful granularity. Rather than re-tuning the interval
ladders, this appends `1d` as an extra option outside the ladder system.
The default interval for each strategy (smallest for Explore,
second-biggest for Dashboards) is computed before the extra is appended,
so defaults are unchanged.

Refs DAIN-1511

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants