Hide first label label

I need to hide the -200 label in yaxis, is there any way to hide the first label of the shortcut? Thus, the result of the yaxis label will be [empty], 0, 200, 400, 600, 800

enter image description here

+2
source share
2 answers

What I did returns an empty string for a negative value.

tickOptions: { formatter: function (format, value) { if (value < 0) { return ' '; } else { return value } } } 
+3
source

Say your chart is included in the div with "chart1" as id, you can hide the first label of the 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 container with yaxis and jqplot-yaxis-tick:nth-child(x) gadgets jqplot-yaxis-tick:nth-child(x) x-th ticks in this container (it goes from 1 to the number of ticks - where 1 represents ticks at the bottom of your chart)

+2
source

All Articles