user882670
user882670

Reputation:

HighCharts series Z index

Is there a way to bring a series to front in Highcharts without reversing the order of the series?

In my code, I've used:

$('#graf-1').highcharts({
            chart: {
                zoomType: 'xy'
            },
            

Upvotes: 20

Views: 25173

Answers (1)

Mark
Mark

Reputation: 108557

Highcharts has a zIndex property.

       series: [{
            name: eixoz,
            color: '#4572A7',
            type: 'line',
            yAxis: 1,
            data: dataz,
            tooltip: {
                valueSuffix: ' %'
            },
            zIndex: 2

        }, {
            name: eixoy,
            color: '#89A54E',
            type: 'column',
            data: datay,
            tooltip: {
                valueSuffix: ' €'
            },
            zIndex: 1
        }]

See this fiddle.

Upvotes: 37

Related Questions