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

[Chart] Reference area can go to more than 100% when some points of data are missing #858

Open
wagnerbsantos opened this issue Oct 7, 2024 · 0 comments
Labels

Comments

@wagnerbsantos
Copy link
Contributor

wagnerbsantos commented Oct 7, 2024

Describe the bug

When a point of data is missing for a reference area below, the current reference area covers a bigger percentage of the chart area. This can be seen in the screenshot when the X axis is at 300. The middle reference area doesn't contain data for when x = 300, this causes the green reference area to expand, thinking the yellow area doesn't exist at that point.

To Reproduce

Steps to reproduce the behavior:

  1. Create a chart with 2 referenceAreas
  2. The top reference area should have 3 points in the array, and the bottom reference area only the first and last points.
  3. This will cause the top reference area to go the described upperLimit for that point.

This also happens currently in the storybook for the ReferenceArea.

Expected behavior

All the reference areas should end at their upperLimit when it exists, and when the value doesn't exist, the value should be interpolated.
As seen in the screenshot, the upperLimit for the Area 3 is 10000, but when x = 300, it goes above 10000.

Screenshots

image

Desktop (please complete the following information):

  • OS: Linux Mint 21 Cinnamon
  • Browser: Brave 1.70
@wagnerbsantos wagnerbsantos changed the title [Component name] Reference area can go to more than 100% when some points of data are missing [Chart] Reference area can go to more than 100% when some points of data are missing Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant