Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add plot line to heat map

Tags:

highcharts

Is it possible to add the plot line to heat map in Highcharts? So I need to add the plot line for specific time on X axis in heat map like this.

like image 758
Alexander Avatar asked Mar 04 '26 21:03

Alexander


1 Answers

Yes, it's possible. Just don't forget to set zIndex, which by default is below series. See demo: http://jsfiddle.net/Zg325/

    yAxis: {
        title: {
            text: null
        },
        labels: {
            format: '{value}:00'
        },
        plotLines: [{
            value: 9,
            color: '#FF0000',
            width: 2,
            zIndex: 10
        }],
        minPadding: 0,
        maxPadding: 0,
        startOnTick: false,
        endOnTick: false,
        tickPositions: [0, 6, 12, 18, 24],
        tickWidth: 1,
        min: 0,
        max: 23
    },

Note: In your example, chart has set inverted: true, to yAxis becomes horizontal one.

like image 189
Paweł Fus Avatar answered Mar 08 '26 23:03

Paweł Fus