1
votes

I have highchart with no grid lines but custom plotlines on yaxis instead. The problem is they split markers and there is no zindex for markers. Chart updates dynamically.

Could i use something like this

$('.highcharts-markers').insertAfter($('.highcharts-grid')[1]);

but with plotlines instead. I have around 10 plotlines. Can someone help me with correct syntax. Or there is any other solution.

I seen similar questions but with grid lines and i dont know can i ask questions in someone's else question. Fiddle https://jsfiddle.net/warnisw/mk9cswjr/652/

1

1 Answers

1
votes

You should use:

        chart: {
            ...,
            events: {
                render: function() {
                    var $markers0 = $('.highcharts-markers.highcharts-series-0'),
                        $plotLines = $('.highcharts-plot-lines-4');

                    $markers0.insertAfter($plotLines);
                }
            }
        }

Live demo: https://jsfiddle.net/BlackLabel/zc5o4rf0/

API: https://api.highcharts.com/highcharts/chart.events.render