JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.highcharts.com/highcharts.src.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
x = null;
$(function () {
var a = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
tooltip: {
shared: true,
enabled: true,
formatter: function() { return 'aaaa'; }
},
plotOptions: {
series: {
point: {
events: {
mouseOver: function(evt) {
a.options.tooltip.formatter = function() { return 'ggggg'; }
var hoveredPoints = a.hoverPoints;
a.tooltip.refresh(hoveredPoints);
},
mouseOut: function() {
a.tooltip.hide();
}
}
}
}
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'LOBYO',
data: [4.0, 1.9, 2.5, 1.5, 8.2, 15.5, 5.2, 16.5, 13.3, 1.3, 15.9, 7.6]
}]
});
});