C3: C3 Chart, y axis scale

Created on 18 Jul 2014  路  5Comments  路  Source: c3js/c3

Hi, first of all congrats for your great library !
I've a questiona about the range of value created on axis using your chart.
I've set a min and a max value for the Y chart in this way:

axis: {
y: {
show: true,
max:maxValue,
min:minValue,
padding: {top:pad, bottom:0},
} ..

Setting in this value 0 for min and 100 for max.
And thats what appear:
schermata 2014-07-18 alle 10 59 36
The value shown is:
0 10 20 30 40 50 60 70 80 90 100
There is a way in which I can have less value? for example:
0 20 40 60 80 100
Because this chart will be in a small windows, and too many values makes the chart hard to understand.
Thank you in advance for your help.

question resolved maybe

Most helpful comment

@smuuf I think it was changed to axis.y.tick.count=5 http://c3js.org/reference.html#axis-y-tick-count
Look at #560

All 5 comments

Hi, Please try axis.y.ticks = 5. This works in my environment.

In mine too. Thank you very much.
Just for who will read this question in the future, my code now is:
axis: {
y: {
show: true,
max:maxValue,
min:minValue,
ticks : 5, // line added
padding: {top:pad, bottom:0},
}

And works perfectly fine.

Thanks for confirmation. I close this issue.

This (having axis.y.ticks = 5) does nothing for me :disappointed:
Here is a _jsbin_ using the version of C3 used at the C3.js website:

http://jsbin.com/zowomedece/1/

Did this functionality maybe somehow disappear, or am I doing something wrong?

@smuuf I think it was changed to axis.y.tick.count=5 http://c3js.org/reference.html#axis-y-tick-count
Look at #560

Was this page helpful?
0 / 5 - 0 ratings

Related issues

snkashis picture snkashis  路  4Comments

Kreozot picture Kreozot  路  3Comments

Shugardude picture Shugardude  路  4Comments

Zerim picture Zerim  路  3Comments

DieterSpringer picture DieterSpringer  路  4Comments