Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqplot - don't want to display / show the y axis

Tags:

axis

show

jqplot

I am using the jqplot charting library from quite sometime.

I don't want to display the y2axis (i.e when I am working with multiple axes/series) Went through the documentation and found that 'show: false' will not show the axis.

Link here: http://www.jqplot.com/docs/files/jqplot-core-js.html#Axis.show

But this doesn't seem to work.

Any help would be greatly appreciated. Thanks in advance

like image 203
Anish Nair Avatar asked Jan 04 '13 06:01

Anish Nair


2 Answers

Fixed it.

Here's what I did.

axes: {
    yaxis: {
    tickOptions: {
        show: false
    },
    rendererOptions: {
        drawBaseline: false
    }
}

Setting tickoptions to false, hides the axis labels and ticks and drawBaseline: false hides the axis line.

Hope it helps.

like image 130
Anish Nair Avatar answered Sep 28 '22 08:09

Anish Nair


You just need to specify showTicks : false

Here is a link on a working fiddle without yaxis ticks : http://jsfiddle.net/BLfRe/23/

like image 26
sdespont Avatar answered Sep 28 '22 08:09

sdespont