Skip to content

fix(tracemetrics): Preserve all visualizes when changing chart type#110618

Merged
nsdeschenes merged 1 commit intomasterfrom
nd/LOGS-607/fix-logs-keep-all-aggregate-selections-changing-chart-types
Mar 13, 2026
Merged

fix(tracemetrics): Preserve all visualizes when changing chart type#110618
nsdeschenes merged 1 commit intomasterfrom
nd/LOGS-607/fix-logs-keep-all-aggregate-selections-changing-chart-types

Conversation

@nsdeschenes
Copy link
Contributor

@nsdeschenes nsdeschenes commented Mar 13, 2026

Changing the chart type (line/area/bar) in the metrics view was dropping all aggregate/visualization selections except the first one.

handleChartTypeChange called useSetMetricVisualize (singular), which replaced the entire visualizes array with a single-element array containing only the updated first visualize. Switching to useSetMetricVisualizes (plural) and mapping over all visualizes preserves the full list while updating the chart type on each.

Fixes LOGS-607

handleChartTypeChange was using useSetMetricVisualize (singular) which
replaced the entire visualizes array with only the first visualize,
dropping all other aggregate selections. Switch to useSetMetricVisualizes
(plural) and map over all visualizes to update the chart type on each.

Fixes LOGS-607
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code
Copy link

linear-code bot commented Mar 13, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 13, 2026
@nsdeschenes nsdeschenes changed the title fix(metrics): Preserve all visualizes when changing chart type fix(tracemetrics): Preserve all visualizes when changing chart type Mar 13, 2026
@nsdeschenes
Copy link
Contributor Author

@sentry review

@nsdeschenes
Copy link
Contributor Author

@cursor review

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@nsdeschenes nsdeschenes marked this pull request as ready for review March 13, 2026 12:56
@nsdeschenes nsdeschenes requested a review from a team as a code owner March 13, 2026 12:56
@nsdeschenes nsdeschenes merged commit b064148 into master Mar 13, 2026
68 checks passed
@nsdeschenes nsdeschenes deleted the nd/LOGS-607/fix-logs-keep-all-aggregate-selections-changing-chart-types branch March 13, 2026 13:21
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