feat(dashboards): Add axisRange frontend types, state, wiring, and builder UI#109390
Merged
feat(dashboards): Add axisRange frontend types, state, wiring, and builder UI#109390
Conversation
static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts
Show resolved
Hide resolved
static/app/views/dashboards/widgetBuilder/components/axisRangeSection.tsx
Outdated
Show resolved
Hide resolved
f548cf2 to
952efdc
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts
Outdated
Show resolved
Hide resolved
mtopo27
commented
Feb 26, 2026
| EventsStats | MultiSeriesEventsStats, | ||
| TableData | ||
| > = { | ||
| axisRange: 'dataMin', |
Contributor
Author
There was a problem hiding this comment.
want the default for mobileAppSize to be dataMin
static/app/views/dashboards/widgets/timeSeriesWidget/timeSeriesWidgetVisualization.tsx
Show resolved
Hide resolved
Comment on lines
1
to
4
| export const AXIS_RANGE_AUTO = 'auto'; | ||
| export const AXIS_RANGE_DATA_MIN = 'dataMin'; | ||
|
|
||
| export type AxisRange = typeof AXIS_RANGE_AUTO | typeof AXIS_RANGE_DATA_MIN; |
Contributor
There was a problem hiding this comment.
This can probably just be an enum
DominikB2014
approved these changes
Feb 27, 2026
mtopo27
added a commit
that referenced
this pull request
Feb 27, 2026
…ilder (#109598) When editing an existing widget that was saved before the axisRange feature (#109390), the builder showed the dataset default (e.g. "Fit to data" for mobile app size) as checked, even though the widget was actually rendering with `auto` (Y-axis starting at 0). This created a mismatch between the builder UI and the actual chart behavior. The fix normalizes missing `axisRange` to `'auto'` when loading an existing widget into the builder. This way `undefined` in builder state unambiguously means "new widget, apply dataset defaults" — existing widgets get an explicit value that matches their current rendering. - Existing widgets: builder shows unchecked, matching actual rendering - New widgets: dataset default still applies (e.g. `dataMin` for mobile app size) - Existing widgets with explicit `axisRange`: no change Refs EME-890 --------- 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.
Add configurable Y-axis range behavior for dashboard time-series widgets.
This introduces
axisRangein 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
autovsdataMinconsistently.It also sets the mobile app size dataset default to
dataMinand enablesPREPROD_APP_SIZEto use the time-series visualization path so app-size chartsbenefit from the same axis-range controls.
A follow-up fix in this PR normalizes runtime
axisRangevalues from URL/querystate and widget payloads. Without normalization, null/invalid values could make
preview behavior diverge from the builder control state. We now accept only
autoanddataMin, and fall back safely to default behavior otherwise.Depends on #109389.
Closes EME-890 (frontend portion)