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
Bar chart with x-axis min and max acts weird with one datapoint #945
Comments
Hi @RanzQ! The reason this is happening is that the There totally is a bit of weirdness with Attaching screencap. @masayuki0812, not sure if I should tag this as Also, can confirm it occurs in 0.4.9, not sure what version the website is currently running. Edit: Going with |
I made a temp fix by modifying
That fixed the width problem I was having. For the min-max bug I just adjusted the min and max in case of one datapoint and it gets centered. Not sure if that affects other charts. I'm using this on a timeseries, min and max work well to fit my domain to a specific time range. |
Thank you for looking into this. Yeah, it's not intended, but it's a bug and width of bar should be computed correctly in this situation. So, I fixed by introducing |
|
I'd like to use the bar chart with a fixed x-axis min, max and values. But the padding and bar width calculation don't work nicely when min and max is set. Try modifying the example http://c3js.org/samples/chart_bar.html like this:
Would it be possible to base the calculations on min-max range and tick-count rather than point count in this case?
The text was updated successfully, but these errors were encountered: