Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show gridlines only on 0 on the yAxis in highcharts?

I have a highcharts graph and everything is going on as the mockup below. But there are a few things I am stuck on. Is there a way to remove all the gridlines from the yAxis except for the one in 0 like the one shown in the picture below with highcharts? Or do we have to use our own javascript to accomplish that? Also, can we show the grey colored areas like that one between the yAxis label and the graph and the one in the right side of the graph (end of the graph) ?

graph mockup

Thanks For any suggestions.

like image 932
saurjk Avatar asked Apr 20 '13 16:04

saurjk


1 Answers

You can set gridLineWidth as 0. http://api.highcharts.com/highcharts#xAxis.gridLineWidth

Example: http://jsfiddle.net/ssQVJ/

yAxis: {
        gridLineColor: '#197F07',
        gridLineWidth: 0,
        lineWidth:1,
         plotLines: [{
            color: '#FF0000',
            width: 1,
            value: 0
        }]
    },
like image 70
Sebastian Bochan Avatar answered Nov 05 '22 11:11

Sebastian Bochan