HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
chart = anychart.waterfall([
3
{ x: 'Net Sales', value: 100 },
4
{ x: 'Cost of Sales', value: -50 },
5
{ x: 'Extraordinary Gain', value: 100},
6
// here we set value for total point
7
{ x: 'Planed total', value: 100, isTotal: true },
8
]);
9
10
// Set totals drawing mode.
11
chart.drawTotalsAsAbsolute(true);
12
13
chart.title('Set totals drawing mode');
14
chart.container('container');
15
chart.draw();
16
});