-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Duplicate y axis values #410
Comments
Yeah, you're correct. The y-axis should automatically reduce the tickAmount if the range is too small to print non-duplicating round numbers. |
this could be a work around here: |
@sheikh303 @junedchhipa how to avoid duplicate y-axis label values in real-time chart without setting min or max or tickAmount, will the labels automatically set based on the y-axis value? |
Y-axis doesn’t provide showDuplicate: false configuration. Only X-axis has it. |
@sheikh303 ok thanks for confirming |
Any news on this? |
this still happens in my line chart. my apexcharts version: 3.35.5 |
@sheikh303 Could you please expand on how the maxYAxisValue and offset are set? Are these values statically assigned because I don't think in any of those chart options, we have access to the y values to dynamically determine what those values should be. |
Please see; #3974 (comment) I have this problem using the Apexcharts card in Home Assistant. Increasing the yaxis decimals value was one solution as, by observation only, it appears as if the grid/ticks are drawn to values proportionate to their spacing between the max/min values but the labelling of those values is simply rounded to the nearest decimals specification for labelling. I tried varying tickAmount also and observed that, although the grid/ticks were evenly spaced, the labelling was not duplicated but also not proportionate. E.g. in the image, the grid is evenly spaced and clearly the label increments: 0.03, 0.04, 0.03, are not proportional. |
Codepen
https://codepen.io/anon/pen/NJBLgv
Explanation
Y axis should not have duplicated values
1 and 4 are duplicated
No error message
Have I misunderstood something?
Thanks for your help!
Update: It seems to be related to the default tickAmount of 6. It would be great if the chart could know itself how to reduce this tickAmount number if there isn't enough data to display 6 points.
The text was updated successfully, but these errors were encountered: