隐藏轴和网格线 Highcharts [英] Hide axis and gridlines Highcharts
本文介绍了隐藏轴和网格线 Highcharts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图完全隐藏 Highcharts 图表的轴和网格线.到目前为止,我已经尝试将线条的宽度设置为 0,但没有成功.
I am trying to hide the axis and gridlines of my Highcharts chart entirely. So far I have tried to set the width of the lines to 0, but it didn't work out.
xAxis: {
lineWidth: 0,
minorGridLineWidth: 0,
lineColor: 'transparent'
}
是否可以仅全局禁用轴线/刻度线和网格线以创建普通"图?
Is it possible to just globally disable the axis lines/ticks and gridlines to create a "plain" plot?
推荐答案
只需添加
xAxis: {
...
lineWidth: 0,
minorGridLineWidth: 0,
lineColor: 'transparent',
...
labels: {
enabled: false
},
minorTickLength: 0,
tickLength: 0
}
到 xAxis 定义.
to the xAxis definition.
从 4.1.9 版本开始,您可以简单地使用轴属性 visible
:
Since Version 4.1.9 you can simply use the axis attribute visible
:
xAxis: {
visible: false,
}
这篇关于隐藏轴和网格线 Highcharts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文