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

XY Chart: Manual mode series naming #87879

Closed
wants to merge 4 commits into from
Closed

Conversation

adela-almasan
Copy link
Contributor

Naming updated to Series{idx} if the series name is matching the y field name.
Fixes issue with fields disappearing in auto mode.

Before

xy_before.mov

After

xy_after.mov

Fixes #85032

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@adela-almasan adela-almasan added area/panel/xychart no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels May 14, 2024
@adela-almasan adela-almasan added this to the 11.1.x milestone May 14, 2024
@adela-almasan adela-almasan self-assigned this May 14, 2024
@adela-almasan adela-almasan requested a review from a team as a code owner May 14, 2024 22:35
@adela-almasan adela-almasan requested review from codeincarnate and nmarrs and removed request for a team May 14, 2024 22:35
Copy link
Contributor

@nmarrs nmarrs left a comment

Choose a reason for hiding this comment

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

nice!

series.forEach((xySeries, idx) => {
if (xySeries.name.value === xySeries.y.field.name) {
xySeries.name.value = `Series ${idx + 1}`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a sad-path for this inner if condition? Does there need to be one?

@adela-almasan
Copy link
Contributor Author

Postponing this as it needs more investigation. Moved issue to backlog.

@grafana-delivery-bot grafana-delivery-bot bot removed this from the 11.1.x milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend area/panel/xychart no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XYChart2: Choose better series name for single dataset
3 participants