Reputation: 501
I am trying to change numeric values within y axis with custom text ones. I tried using loop but it takes only the first one.
callback:function(value) {
var value = ["January", "February", "March", "April", "May"];
for(i = 0; i < value.length; i++){
return value[i];
}
}
here is FIDDLE with the sample graph
maybe case of something ?
Upvotes: 2
Views: 1816
Reputation: 67207
Try to return value from the array properly,
callback:function(value) {
var x = ["January", "February", "March", "April", "May", "June", "July"];
return x[value | 0];
}
Upvotes: 3