简体   繁体   中英

Bring marker to front of grid line in Highcharts

Currenly i am able to make the chart with configuration in my 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.

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. You could (as suggested in comments) manipulate DOM .

Demo: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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