JSFiddle - React, Tailwind, and code Playground
by Torstein Hønsi
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<div id="container" style="min-width: 310px; max-width: 600px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
xAxis: {
type: 'category'
},
legend: {
enabled: false
},
plotOptions: {
series: {
dataLabels: {
enabled: true
}
}
},
series: [{
type: 'column',
pointRange: 1,
data: [{
name: 'Start',
x: 0,
y: 120000
}, {
name: 'Balance',
x: 6,
y: 100000
}]
}, {
type: 'waterfall',
threshold: 120000,
data: [{
name: 'Product Revenue',
x: 1,
y: 569000
}, {
name: 'Service Revenue',
x: 2,
y: 231000
}, {
name: 'Positive Balance',
x: 3,
y: 100000
}, {
name: 'Fixed Costs',
x: 4,
y: -342000
}, {
name: 'Variable Costs',
x: 5,
y: -233000
}]
}]
});
});