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>
<div id="container2" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'areaspline'
},
title: {
text: 'Current behavior'
},
xAxis: {
tickmarkPlacement: 'on',
title: {
enabled: false
}
},
tooltip: {
shared: true,
valueSuffix: ' millions'
},
plotOptions: {
areaspline: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
},
series: [{
name: 'Test1',
data: [[1,2], [2,1], [3,2], [4,1], [5,3]],
connectNulls: true
}, {
name: 'Test2',
data: [[1,1], [2.2,1], [3,1], [4,1], [5,1]],
connectNulls: true
}]
});
$('#container2').highcharts({
chart: {
type: 'areaspline'
},
title: {
text: 'Desired behavior'
},
xAxis: {
tickmarkPlacement: 'on',
title: {
enabled: false
}
},
tooltip: {
shared: true,
valueSuffix: ' millions'
},
plotOptions: {
areaspline: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
},
series: [{
name: 'Test1',
data: [[1,2], [2,1], [2.2, 1.16], [3,2], [4,1], [5,3]]
}, {
name: 'Test2',
data: [[1,1], [2,1], [2.2,1], [3,1], [4,1], [5,1]]
}]
});
});