Hi Masayuki,
Is there an option to force to start the Y-axis always with 0?
I know you could add an optional grid-line on the Y-axis in 0, but I want to force the chart's y-axis always to start in 0.
Thanks in advance!
Regards,
Paul
Hi Paul,
You can do it by setting axis.y.min = 0.
Sample is here - http://c3js.org/samples/axes_y_range.html
And if padding not needed between 0 and x axis, you can use axis.y.padding with option above, like axis.y.padding = {bottom: 0}.
Sample is here - http://c3js.org/samples/axes_y_padding.html
Please try these options with the latest version (I fixed bug for padding..).
Thank you.
Hi Masayuki,
Thanks! This works exactly like I wanted.
Regards,
Paul
Most helpful comment
Hi Paul,
You can do it by setting
axis.y.min = 0.Sample is here - http://c3js.org/samples/axes_y_range.html
And if padding not needed between 0 and x axis, you can use
axis.y.paddingwith option above, likeaxis.y.padding = {bottom: 0}.Sample is here - http://c3js.org/samples/axes_y_padding.html
Please try these options with the latest version (I fixed bug for padding..).
Thank you.