Highcharts Demo
author(s):
Torstein Hønsi
by Muhammad Mushtaq Sheikh
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 310px;
max-width: 800px;
height: 400px;
margin: 0 auto
}
#points td {
border: 1px solid black;
}
JavaScript
Highcharts.wrap(Highcharts.Tooltip.prototype, 'hide', function(defaultCallback) {
//if ( /* .. */ ) {
////Do Nothing (Do Not Hide)
//} else { // Call the default Hide Callback
//defaultCallback.apply(this);
//}
});
//Highcharts.wrap(Highcharts.Tooltip.prototype, 'refresh', function(proceed, point, event, click) {
// if (click) {
// proceed.apply(this, Array.prototype.slice.call(arguments, 1));
// }
//});
var chart = Highcharts.chart('container', {
xAxis: {
labels: {
format: '{value:,.0f}'
},
title: {
text: 'SMR',
style: {
'fontSize': '16px',
'color': '#000000',
'fontWeight': '600'
}
}
},
yAxis: {
title: {
text: 'Wear %',
style: {
'fontSize': '16px',
'color': '#000000',
'fontWeight': '600'
}
}
},
series: [{
name: 'LHS',
data: [
[1000, 13],
[2029, 28],
[3121, 36],
[4165, 45],
[5467, 57],
[7298, 75],
[8897, 89],
[9876, 95],
],
point: {
events: {
mouseOver: function(e) {
this.series.chart.tooltip.refresh(this, e, true);
},
mouseOut: function(e) {
//this.series.chart.tooltip.hide();
}
}
}
}]
});
//var points = document.getElementById('points').children;
//Highcharts.each(points, function(el, index) {
//el.addEventListener("click", function(e) {
//chart.tooltip.refresh(chart.series[0].points[index], e, true);
//});
//});