JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
title: {
text: 'UK Life Expectancy',
x: -20 //center
},
subtitle: {
text: 'Source: National Statistics',
x: -20
},
xAxis: {
allowDecimals: false,
labels: {
formatter: function() {
return this.value;
}
}
},
yAxis: {
title: {
text: 'Age'
},
min: 70
},
plotOptions: {
},
series: [{
name: 'Current',
type: 'line',
color: '#4572A7',
data: [ 76.9, 77.2, 77.4, 77.6, 78.1, 78.5, 78.6, 60, 65, 70, 75, 80 ]
},{
name: 'Current',
type: 'line',
color: 'red',
data: [ 76.9, 77.2, 77.4, 77.6, 78.1, 78.5, 78.6, 65, 70, 75, 80 , 85 ]
},
{
name: 'Current',
type: 'line',
color: 'green',
data: [ 76.9, 77.2, 77.4, 77.6, 78.1, 78.5, 78.6, 55, 60, 65, 70, 75 ]
}]
});
});
});