JSFiddle - React, Tailwind, and code Playground
by sbochan
HTML
<script src="http://code.highcharts.com/highcharts.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
$(function () {
$('#container').highcharts({
chart: {
type: 'spline'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%e. %b',
year: '%b',
day: '%d'
},
title: {
text: 'Time'
},
},
yAxis: {
title: {
text: 'Alert Size'
},
min: 0,
},
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x:%e. %b}: {point.y:.2f}'
},
series: [{
name: 'Point',
// Define the data points. All series have a dummy year
// of 1970/71 in order to be compared on the same x axis. Note
// that in JavaScript, months start at 0 for January, 1 for February etc.
data: [
[1441293135000, 50],
[1441293195000, 100],
[1441293255000, 150],
[1441293315000, 250],
[1441293375000, 50]
]
}]
});
});