Skip to content Skip to sidebar Skip to footer

How To Correct Mouse Event In Highcharts

I am trying to plot xy line in which y axis is reversed and I am getting plot but mouse event I am unable to correct it it is showing reverse event, and I want to find min and mix

Solution 1:

Answers:

  • you have errors in JS console - fix them (sort data ascending by x-value!)
  • to set min and max, just don't set anything, Highcharts will calculate extremes
  • to display xAxis on top, set opposite: true

Demo: http://jsfiddle.net/2xLvY/1/

var chart = new Highcharts.Chart({
    chart: {
        renderTo: 'container',
        zoomType: 'xy',
        marginLeft: 50,
        marginBottom: 90
    },

    yAxis: {
        reversed: true,
        //min: 0,
        //max: 50
    },
    plotOptions: {
        series: {
            stacking: 'normal'
        }
    },
    xAxis: {
        opposite: true  
    },
    series: [{
        name: '01-Jan-2014',
        data: [
            // NOTE: proper order, first x-value is lower that second
            [28, 10],
            [30, 0]
        ]
    }]
});

Post a Comment for "How To Correct Mouse Event In Highcharts"