Skip to content

fix: Do not render tooltip descriptions if set to null #57

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

jperals
Copy link
Member

@jperals jperals commented Jul 8, 2025

Description

This allows to override the default error ranges in the descriptions and group them in the tooltip footer instead.

Rel: 6wXLAG4Wx5eV (see e.g, "Displaying nothing" section)

How has this been tested?

  • Unit tests
  • Manually, in the error bars dev page, the descriptions under key-value-pairs are now empty as expected when grouped in the footer:
    Screenshot 2025-07-08 at 15 31 52
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -31,7 +31,7 @@ describe("CartesianChart: errorbar series", () => {
expect(getAllTooltipSeries()).toHaveLength(1);
expect(getTooltipSeries(0).findKey().getElement().textContent).toBe("Column 1");
expect(getTooltipSeries(0).findValue().getElement().textContent).toBe("2");
expect(getTooltipSeries(0).findDescription().getElement().textContent).toBe("Error range1 - 3");
expect(getTooltipSeries(0).findDescription()!.getElement().textContent).toBe("Error range1 - 3");
Copy link
Member Author

Choose a reason for hiding this comment

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

Before, the ! were not necessary because the description could never be empty, but it should be able to.

@jperals jperals added this pull request to the merge queue Jul 17, 2025
Merged via the queue into main with commit 00dbda8 Jul 17, 2025
39 of 40 checks passed
@jperals jperals deleted the fix/description-null branch July 17, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants