JSFiddle - React, Tailwind, and code Playground
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: {
zoomType: 'x'
},
title: {
text: 'Statistiques Globales'
},
subtitle: {
text: document.ontouchstart === undefined ?
'' :
''
},
xAxis: {
type: 'number',
minRange: 1 //
},
yAxis: {
title: {
text: 'Gains en Euro'
}
},
legend: {
enabled: false
},
plotOptions: {
area: {
fillColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
},
marker: {
radius: 2
},
lineWidth: 1,
states: {
hover: {
lineWidth: 1
}
},
threshold: null
}
},
series: [{
type: 'area',
name: 'Profits',
pointInterval: 1,
pointStart: 0,
data: [-100, 150, 185, 199, 182.5, 221.30, 254.85, 289.7, 311.25, 351.12
]
}]
});
});