C3 Line chart - Y axis issues
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
Hi, I am having problems with the Y-axis functionality. I have a line chart, and I wish to have the following:
- a min value of zero
- Y axis with 3 ticks
- first tick = 0
- padding between the first tick (zero) and the base line
I can't seem to get all of this desired functionality into one chart. Please see my JSFiddle:
https://jsfiddle.net/lcrees/55ea7k3j/
As you can see in the fiddle, I can have a min value of zero with the first tick = 0 and padding between the first tick (zero) and the baseline, but only if I do not set the number of ticks I want (see Chart 1). Once I set the number of ticks, the default padding is lost and the ticks do not start at the min value of zero. (see Chart 2)
Also, from our dynamic charts in our application, I notice that some random data points cause the Y axis first tick to be set to a negative number despite the min being set to zero (see Chart 3).
Is there a way to achieve all our desired functionality? Basically, the functionality we want would be Chart 1 but with only 3 ticks.
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.