JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" 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: 'areaspline'
},
title: {
text: 'Hourly vs Fixed-price contracts incomes'
},
subtitle: {
text: 'Source: ' +
'http://malditointer.net'
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 150,
y: 100,
floating: true,
borderWidth: 1,
backgroundColor: '#FFFFFF'
},
xAxis: {
categories: [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec', ],
},
yAxis: [
{
title: {
text: 'Income in euros'
}
},
{
title: {
text: 'Time in hours'
},
opposite: true
}
],
tooltip: {
shared: true,
valueSuffix: ' euros'
},
credits: {
enabled: false
},
plotOptions: {
areaspline: {
fillOpacity: 0.1
}
},
series: [{
name: 'Hourly income',
data: [58, 85, 515, 389, 646, 849, 974, 1122, 1066, 1021, 1014, 845]
}, {
name: 'Fixed-price income',
data: [0, 0, 285, 285, 285, 285, 285, 570, 1774, 1881, 2463, 435]
}, {
name: 'Tracked hours',
data: [0, 9, 93, 58, 115, 125, 124, 175, 152, 147, 158, 89],
yAxis: 1,
tooltip: {
valueSuffix: ' hours'
}
}]
});
});