JSFiddle - React, Tailwind, and code Playground
by H17737
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 200px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'areaspline'
},
title: {
text: ''
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 150,
y: 10,
floating: true,
borderWidth: 1,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
xAxis: {
categories: [
'Lundi',
'Mardi',
'Mercredi',
'Jeudi',
'Vendredi',
'Samedi',
'Dimanche'
]
},
yAxis: {
title: {
text: 'Interventions'
}
},
tooltip: {
shared: true,
valueSuffix: ''
},
credits: {
enabled: false
},
plotOptions: {
areaspline: {
fillOpacity: 0.5
}
},
series: [{
name: 'Total',
data: [3, 4, 3, 5, 4, 10, 12]
}, {
name: 'Retard léger (< 15 min)',
data: [1, 0, 0, 0, 1, 0, 0],
color: '#FFBD00'
}, {
name: 'Retard moyen (< 30 min)',
data: [0, 1, 0, 0, 0, 0, 4],
color: '#FF8F00'
}, {
name: 'Long retard (> 30 min)',
data: [0, 0, 1, 0, 1, 0, 1],
color: '#FF3706'
}]
});
});