Waterfall - multiple intermediate sum
Time series data + multiple intTotal
by amrutaJgtp
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
</figure>
CSS
.highcharts-figure,
.highcharts-data-table table {
min-width: 320px;
max-width: 700px;
margin: 1em auto;
}
.highcharts-data-table table {
font-family: Verdana, sans-serif;
border-collapse: collapse;
border: 1px solid #ebebeb;
margin: 10px auto;
text-align: center;
width: 100%;
max-width: 500px;
}
.highcharts-data-table caption {
padding: 1em 0;
font-size: 1.2em;
color: #555;
}
.highcharts-data-table th {
font-weight: 600;
padding: 0.5em;
}
.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
padding: 0.5em;
}
.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
background: #f8f8f8;
}
.highcharts-data-table tr:hover {
background: #f1f7ff;
}
JavaScript
Highcharts.chart('container', {
"chart": {
"zoomType": "xy"
},
"plotOptions": {
"series": {
"showInLegend": true
}
},
"legend": {
"enabled": true
},
"series": [{
"zIndex": 1,
"type": "waterfall",
"data": [{
"eQCategoryValue": "01/01/2016",
"x": Date.UTC(2015, 12, 31),
"y": 0
},
{
"eQCategoryValue": "01/02/2016",
"x": Date.UTC(2016, 01, 01),
"y": null
},
{
"eQCategoryValue": "01/03/2016",
"x": Date.UTC(2016, 01, 02),
"y": null
},
{
"eQCategoryValue": "01/04/2016",
"x": Date.UTC(2016, 01, 03),
"y": null
},
{
"eQCategoryValue": "01/05/2016",
"x": Date.UTC(2016, 01, 04),
"y": null
},
{
"eQCategoryValue": "01/06/2016",
"x": Date.UTC(2016, 01, 05),
"y": null
},
{
"eQCategoryValue": "01/07/2016",
"x": Date.UTC(2016, 01, 06),
"y": 5
},
{
"eQCategoryValue": "01/08/2016",
"x": Date.UTC(2016, 01, 07),
"isSum": true,
"color": "red"
},
{
"eQCategoryValue": "01/09/2016",
"x": Date.UTC(2016, 01, 08),
"y": null
},
{
"eQCategoryValue": "01/10/2016",
"x": Date.UTC(2016, 01, 09),
"y": null
},
{
"eQCategoryValue": "01/11/2016",
"x": Date.UTC(2016, 01, 10),
"y": null
},
{
"eQCategoryValue": "01/12/2016",
"x": Date.UTC(2016, 01, 11),
"y": null
},
{
"eQCategoryValue": "01/13/2016",
"x": Date.UTC(2016, 01, 12),
"y": 3
},
{
"eQCategoryValue": "01/14/2016",
"x": Date.UTC(2016, 01, 13),
"y": 1
},
...