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: {
type: 'column'
},
title: {
text: 'The stacked sequence of series with negative values.'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
allowDecimals: false,
title: {
text: 'Number of fruits'
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.x +'</b><br/>'+
this.series.name +': '+ this.y +'<br/>'+
'Total: '+ this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'normal'
}
},
//stack-0
series: [{
name: 'A',
data: [5, 3, 4, 7, 2],
stack: '0'
}, {
name: 'B',
data: [3, 4, 4, 2, 5],
stack: '0'
}, {
name: 'C',
data: [-3, 4, 4, 2, 5],
stack: '0'
}, {
name: 'D',
data: [-5, 4, 4, 2, 5],
stack: '0'
}]
});
});