[英]How to hide date time x-axis but still be able to show plot lines in Highcharts gantt chart?
I want to disable or hide marked x-axis on the following image: 我要在以下图像上禁用或隐藏标记的x轴:
But I still need to be able to show a plot line. 但是我仍然需要能够显示出一条情节线。
I tried to play around with "xAxis" Highcharts property and I am able to hide marked x-axis, but then I can not add a plot line. 我尝试使用“ xAxis” Highcharts属性进行操作,并且能够隐藏标记的x轴,但随后无法添加绘图线。 It seems to me this axis is somehow connected with the plot. 在我看来,这个轴与情节有某种联系。
Thanks a lot for help. 非常感谢您的帮助。
The plotLines
are connected to an axis, but you can separately disable the grid
and the labels
: plotLines
连接到轴,但是您可以分别禁用grid
和labels
:
xAxis: [{
...,
grid: {
enabled: false
},
plotLines: [{
color: 'red',
value: today + day * 7,
width: 5
}],
labels: {
enabled: false
},
tickLength: 0
}, {
visible: false
}]
Live demo: https://jsfiddle.net/BlackLabel/c2xLruvp/ 现场演示: https : //jsfiddle.net/BlackLabel/c2xLruvp/
API Reference: https://api.highcharts.com/gantt/xAxis.visible API参考: https : //api.highcharts.com/gantt/xAxis.visible
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.