Reputation: 397
I need to hide the label -200 in yaxis, is there any way to hide the first yaxis label? So the yaxis label result will be [empty] ,0, 200, 400, 600, 800
Upvotes: 2
Views: 1156
Reputation: 2335
Let say your chart is included in a div with "chart1" as id, you can hide the first yaxis label using :
$("div#chart1 div.jqplot-yaxis div.jqplot-yaxis-tick:nth-child(1)").css('display','none');
Where div#chart1
represents your chart, div.jqplot-yaxis
your yaxis ticks container and jqplot-yaxis-tick:nth-child(x)
the x-th ticks in this container (it goes from 1 to number of ticks - where 1 represents the ticks at the bottom of your chart)
Upvotes: 2
Reputation: 397
What i did is return an empty string for negative value.
tickOptions: {
formatter: function (format, value) {
if (value < 0) {
return ' ';
}
else {
return value
}
}
}
Upvotes: 3