How to remove grid lines from Flot chart

Firoz picture Firoz · Jan 29, 2014 · Viewed 12.2k times · Source

I am using Flot in my application and it is working fine. I want to remove both vertical lines and horizontal lines from the the background of the chart. I tried this but I am not able to achieve the functionality.

grid: {
    verticalLines:false,
    horizontalLines:false
}

Can anyone help me in this regard?

Answer

Mark picture Mark · Jan 29, 2014

You can remove the lines, use tickLength: 0

$.plot("#flot", dataset,
{
    yaxis: {tickLength:0}, 
    xaxis: {tickLength:0}
});

Fiddle here.