JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function() {
$('#container').highcharts({
yAxis: [{}, {}, {}],
tooltip: {
shared: true,
},
series: [{
name: 'temperature',
data: [7.0, 6.9, 9.5]
}, {
name: 'on/off',
yAxis: 1,
data: [0, 1, 1],
tooltip: {
pointFormatter: function() {
var point = this;
return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + (point.y > 0 ? 'On' : 'off') + '</b><br/>';
}
}
}, {
name: 'percent',
data: [-10, 11, 12],
yAxis: 2
}]
});
});