Skip to content

feat(dashboards): Persist and serve axisRange on dashboard widgets#109389

Open
mtopo27 wants to merge 1 commit intomasterfrom
mtopo27/add-axis-range-backend
Open

feat(dashboards): Persist and serve axisRange on dashboard widgets#109389
mtopo27 wants to merge 1 commit intomasterfrom
mtopo27/add-axis-range-backend

Conversation

@mtopo27
Copy link
Contributor

@mtopo27 mtopo27 commented Feb 25, 2026

Summary

  • Add axis_range ChoiceField ("auto" | "dataMin") to DashboardWidgetSerializer
  • Wire axis_range into create_widget and update_widget detail dict persistence
  • Return axisRange in API responses via DashboardWidgetResponse TypedDict and serialize()
  • Add backend tests for create, update, and invalid value validation

Test plan

  • pytest -svv --reuse-db tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py -k "axis_range" — new tests pass
  • pytest -svv --reuse-db tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py — no regressions
  • Existing widgets without axis_range in detail return axisRange: null (backward compatible)

Closes EME-890 (backend portion)

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
@mtopo27 mtopo27 requested a review from a team as a code owner February 25, 2026 22:18
@linear
Copy link

linear bot commented Feb 25, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant