Reputation: 1036
I am using jQPlot and disabled the grid lines on my charts (drawGridlines: false). However, I would like to have a line at yaxis = 0, and I also would like to make sure that the 0 appears as well. Is this doable easily?
Thanks!
Upvotes: 1
Views: 1276
Reputation: 2335
You can add an object in canvasOverlay :
var options={ //jqplot options
canvasOverlay: {
show: true,
objects: [
{
horizontalLine: {
name: "y=0",
y: 0,
yaxis: "yaxis",
lineWidth: 1,
color: "rgb(0,0,0)",
shadow: false
}
}
]
}
}
Don't forget to include jqplot.canvasOverlay.min.js
plugin.
Upvotes: 5