Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboards): Improve series alias resolution #88556

Merged

Conversation

gggritso
Copy link
Member

@gggritso gggritso commented Apr 2, 2025

Fixes DAIN-143. There's a subtle bug (introduced in #87023) in which if multiple plottables had the same alias, ECharts would merge them in the legend. e.g., imagine plotting span.duration for two really long queries. The truncation series name formatter would clip the names, and if the first parts of the queries match they'd have the same name, and the same legend entry. Confusing! This PR resolves that problem, and ensures that every plottable has a legend entry.

Changes

  • add Plottable.name, a string property that's passed directly to ECharts. This is a steady under-the-hood value that ECharts uses when passing stuff around
  • resolve all aliases ahead-of-time, so they're fast to look up
  • defer to aliases when rendering tooltips and legends

gggritso added 4 commits April 2, 2025 09:59
This is different from the label! It's a steady value, used
under-the-hood in ECharts.
It's a little ambiguous and doesn't match other formatters
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 2, 2025
@gggritso gggritso requested a review from ArthurKnaus April 2, 2025 14:29
@gggritso gggritso marked this pull request as ready for review April 2, 2025 14:45
@gggritso gggritso requested a review from a team as a code owner April 2, 2025 14:45
Copy link
Member

@ArthurKnaus ArthurKnaus left a comment

Choose a reason for hiding this comment

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

🚀

@gggritso gggritso merged commit 6026fbc into master Apr 2, 2025
43 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-143-disambiguate-aliases-and-labels branch April 2, 2025 14:55
ryan953 added a commit that referenced this pull request Apr 7, 2025
…eries (#88983)

After #88556 we need to use the
`name/field` property within the `legendSelection` map.

The story was broken/backwards which threw me off for a while. But I
renamed the sample time series variables and it became much more
obvious.
andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
Fixes DAIN-143. There's a subtle bug (introduced in
#87023) in which if multiple
plottables had the same alias, ECharts would merge them in the legend.
e.g., imagine plotting `span.duration` for two really long queries. The
truncation series name formatter would clip the names, and if the first
parts of the queries match they'd have the same name, and the same
legend entry. Confusing! This PR resolves that problem, and ensures that
every plottable has a legend entry.

## Changes
- add `Plottable.name`, a string property that's passed directly to
ECharts. This is a steady under-the-hood value that ECharts uses when
passing stuff around
- resolve all aliases ahead-of-time, so they're fast to look up
- defer to aliases when rendering tooltips and legends
andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
…eries (#88983)

After #88556 we need to use the
`name/field` property within the `legendSelection` map.

The story was broken/backwards which threw me off for a while. But I
renamed the sample time series variables and it became much more
obvious.
Christinarlong pushed a commit that referenced this pull request Apr 10, 2025
…eries (#88983)

After #88556 we need to use the
`name/field` property within the `legendSelection` map.

The story was broken/backwards which threw me off for a while. But I
renamed the sample time series variables and it became much more
obvious.
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