JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://highcharts.com/js/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'scatter'
},
title: {text: 'Testing Scatter'},
xAxis: {
title: {
enabled: true,
text: 'Height (cm)'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true,
type: 'datetime',
labels: {
formatter: function() {
return Highcharts.dateFormat('%a', this.value);
}
}
},
yAxis: {title: {text: 'Weight (kg)' }},
tooltip: {
formatter: function () {
return '' + this.x + ' cm, ' + this.y + ' kg';
}
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 100,
y: 70,
floating: true,
borderWidth: 1,
backgroundColor: '#ffffff'
},
plotOptions: {
scatter: {
marker: {
radius: 5,
states: {
hover: {
enabled: true
}
}
}
}
},
series: [{
name: 'Error1',
data: [[Date.UTC(2012, 5, 29, 12, 00), 50], [Date.UTC(2012, 5, 22, 12, 00), 50]]
}, {
name: 'Error2',
data: [[Date.UTC(2012, 5, 22, 12, 00), 60], [Date.UTC(2012, 5, 29, 12, 00), 60]]
}]
});