feat(dashboards): Persist and serve axisRange on dashboard widgets#109389
Merged
feat(dashboards): Persist and serve axisRange on dashboard widgets#109389
Conversation
Accept `axisRange` ("auto" | "dataMin") on widget create/update, store
it in the existing `detail` JSONField alongside `layout`, and return it
in API responses. This enables configurable Y-axis range for timeseries
widgets so small variations in high-baseline data are visible.
EME-890
The API docs test was failing because the CreateDashboard example was missing the newly added axisRange property.
DominikB2014
approved these changes
Feb 26, 2026
mtopo27
added a commit
that referenced
this pull request
Feb 27, 2026
…ilder UI (#109390) Add configurable Y-axis range behavior for dashboard time-series widgets. This introduces `axisRange` in the frontend widget model and widget-builder state, adds a "Fit Y-Axis to data" control in the builder for time-series display types, and wires the setting through widget conversion and rendering so charts respect `auto` vs `dataMin` consistently. It also sets the mobile app size dataset default to `dataMin` and enables `PREPROD_APP_SIZE` to use the time-series visualization path so app-size charts benefit from the same axis-range controls. A follow-up fix in this PR normalizes runtime `axisRange` values from URL/query state and widget payloads. Without normalization, null/invalid values could make preview behavior diverge from the builder control state. We now accept only `auto` and `dataMin`, and fall back safely to default behavior otherwise. Depends on #109389. Closes EME-890 (frontend portion) --------- Co-authored-by: Claude <noreply@anthropic.com>
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
axis_rangeChoiceField ("auto"|"dataMin") toDashboardWidgetSerializeraxis_rangeintocreate_widgetandupdate_widgetdetail dict persistenceaxisRangein API responses viaDashboardWidgetResponseTypedDict andserialize()Test plan
pytest -svv --reuse-db tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py -k "axis_range"— new tests passpytest -svv --reuse-db tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py— no regressionsaxis_rangeindetailreturnaxisRange: null(backward compatible)Closes EME-890 (backend portion)