简体   繁体   English

将标记移到Highcharts中的网格线的前面

[英]Bring marker to front of grid line in Highcharts

Currenly i am able to make the chart with configuration in my jsfiddle. Currenly,我能够在jsfiddle中进行配置图表。 But one thing left is that i want the markers (points) display above the gridlines. 但是剩下的一件事是,我希望标记(点)显示在网格线上方。 As my research, the highchart marker does not have options for zIndex. 根据我的研究,highchart标记没有zIndex选项。

http://jsfiddle.net/ngoclamnn/jsegagwp/1/ http://jsfiddle.net/ngoclamnn/jsegagwp/1/

Tried with this code: 尝试使用此代码:

function(chart){
   console.log(chart);
   chart.series[1].graph.toFront();
   chart.series[1].group.toFront();
   chart.series[1].markerGroup.toFront();
}

But it still not success. 但是它仍然没有成功。 Hope that someone can help :) 希望有人可以帮助:)

The feature is not available in Highcharts because all series are in the same group. 该功能在Highcharts中不可用,因为所有系列都在同一组中。 You could (as suggested in comments) manipulate DOM . 您可以(如注释中所建议)操纵DOM

Demo: http://jsfiddle.net/qaytamvy/ 演示: http//jsfiddle.net/qaytamvy/

The solution might not work well for all cases - like dynamic chart changes, so just keep in mind this is more like a POC then a solid fix. 该解决方案可能不适用于所有情况-例如动态图表更改,因此请记住,这更像是POC,而不是可靠的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM