Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 jQPlot 并禁用图表上的网格线(drawGridlines:false)。但是,我想在 yaxis = 0 处有一条线,并且我还想确保 0 也出现。这很容易实现吗?
谢谢!
您可以在 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 } } ] } }
不要忘记包含jqplot.canvasOverlay.min.js插件。
jqplot.canvasOverlay.min.js