问题描述
我使用jqPlot作为我的图表框架,在我的应用程序中有许多图表,主要是线和堆积的条形图。
I am using jqPlot as my charting framework and have numerous charts in my application, primarily line and stacked bar charts.
我现在有一个要求,只显示这些图表上的水平网格线,没有看到任何选项在jqPlot这样做。
I now have a requirement to only show the horizonal grid lines on these charts and do not see any options in jqPlot to do this.
有一个 showGridline
选项,但是完全禁用网格线。
There is a showGridline
option but that disables the grid lines entirely.
是否可以只删除jqPlot中的垂直网格线,并继续显示水平网格线?
Is it possible to remove only the vertical grid lines in jqPlot and continue to show the horizontal ones?
推荐答案
我想出来了。您可以通过执行以下操作将 showGridline
应用到单个轴:
I figured it out. You can apply showGridline
to a single axis by doing the following:
axes:{
xaxis: {
tickOptions:{
showGridline: false
}
}
}
这篇关于jQPlot - 删除垂直网格线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!