Highcharts test tool
by hakan
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container"></div>
<div id="container2"></div>
CSS
#container {
min-width: 300px;
max-width: 800px;
height: 300px;
margin: 1em auto;
}
JavaScript
(function (H) {
H.wrap(H.Tooltip.prototype, 'refresh', function (proceed, point, mouseEvent) {
var tooltip = this;
if (this.options.delay && tooltip.isHidden) {
if (point !== this.queuePoint) {
clearTimeout(this.showTimer);
}
this.queuePoint = point;
this.showTimer = setTimeout(function () {
proceed.call(tooltip, point, mouseEvent);
}, this.options.delay);
} else {
proceed.call(this, point, mouseEvent);
}
});
}(Highcharts));
$('#container').highcharts({
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
tooltip: {
delay: 1000
},
series: [{
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]
}]
});
$('#container2').highcharts({
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
tooltip: {
delay: 1000
},
series: [{
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]
}]
});