Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scatter tooltip of highchart is not being displaying

I have a highchart of scatters and bars . I am unable to view tooltip of a scatter point which is over bar... here is the fiddle http://jsfiddle.net/tZ9Rt/

I am using these two series:

series: [{
        type: 'scatter',
        index:2,
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
        name: 'Temperature'
    }, {
        type: 'column',
        index:1,
        data: [220,220,220,220,120,220,220,220,220,220,220,220],
        name: 'Rainfall'
    }]

Any help is highly appreciated...

Thanks

like image 1000
Mubbasher Khaliq Avatar asked Dec 11 '22 21:12

Mubbasher Khaliq


1 Answers

Make your tooltip shared, and change the series type to 'line' and lineWidth to 0. Then you'll have a "line" chart that looks like a scatter plot, but tooltips work!

tooltip: {
    shared: true //make the tooltip accessible across all series
},
plotOptions: {
    line: {
        lineWidth: 0 //make the lines disappear
    }
},
series: [{
    type: 'column',
    name: 'Column Data',
    data: [5, 4, 3, 2, 1, 0]
}, {
    type: 'line', //this is a 'fake' scatter plot
    name: 'Pseudo-scatter',
    data: [0, 1, 2, 3, 4, 5]
}]
like image 193
John Zwinck Avatar answered Dec 29 '22 22:12

John Zwinck