{
"chart": {
"type": "spline",
"panning": true,
"animation": false,
"reflow": false,
"events": {}
},
"plotOptions": {
"series": {
"lineWidth": 3,
"cursor": "pointer",
"states": {
"hover": {
"enabled": false,
"marker": {
"enabled": false
}
}
},
"point": {
"events": {}
}
}
},
"xAxis": {
"categories": [] // "00:00" to "23:00",
"gridLineWidth": 1,
"gridLineColor": "#efefef",
"minRange": 5,
"lineWidth": 3
},
"yAxis": {
"title": {
"text": ""
},
"gridLineWidth": 1,
"gridLineColor": "#efefef",
"style": {
"display": "none"
},
"minRange": 6
}
}
我是否可以将这些点与背景中的 x 轴网格线对齐?我已经附加了迄今为止拥有的 Highcharts 对象。
谢谢
最佳答案
一种方法可能是使用,正如jlbriggs在评论中建议的那样,tickmarkPlacement
- x轴选项。这将移动网格线和刻度。
示例:http://jsfiddle.net/ztsesk7f/
其他方法可能是设置 pointPlacement
- 系列选项。这将移动点数。
关于javascript - 如何在 Highcharts 中将网格线与点对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35015690/