<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZingSoft Demo</title>
<script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
<style>
.chart--container {
height: 100%;
width: 100%;
min-height: 530px;
}
.zc-ref {
display: none;
}
</style>
</head>
<body>
<div id="myChart" class="chart--container"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
let chartConfig = {
type: 'waterfall',
theme: 'classic',
backgroundColor: '#F1F2F4',
borderColor: '#B9BABC',
borderRadius: '3px',
borderWidth: '1px',
options: {
final: {
backgroundColor: '#5381B3',
},
intermediate: {
backgroundColor: '#5381B3',
},
line: {
lineGapSize: '4px',
lineSegmentSize: '4px',
lineStyle: 'dashed',
lineWidth: '1px',
},
negative: {
backgroundColor: '#CD3132',
},
positive: {
backgroundColor: '#739137',
},
},
plot: {
valueBox: {
text: '$%vk',
backgroundColor: '#FFF',
color: 'black',
shadow: false,
},
barWidth: '30px',
},
plotarea: {
marginTop: '20px',
marginRight: '20px',
borderColor: '#B9BABC',
borderWidth: '1px',
},
scaleX: {
backgroundColor: 'white',
guide: {
visible: false,
},
item: {
color: '#666',
offsetY: '0px',
rules: [{
offsetY: '20px',
rule: '%i%2==0',
}, ],
},
itemsOverlap: true,
labels: [
'Product Revenue',
'Services Revenue',
'Fixed Costs',
'Variable Costs',
'Total',
],
lineColor: '#B9BABC',
lineWidth: '1px',
offsetStart: '16px',
offsetEnd: '16px',
tick: {
visible: false,
},
},
scaleY: {
values: '0:700:140',
format: '%vK',
guide: {
lineStyle: 'solid',
},
item: {
color: '#666',
},
lineColor: '#B9BABC',
lineWidth: '1px',
tick: {
visible: false,
},
},
series: [{
values: [420, 210, -170, -140, 'SUM'],
}, ],
};
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});
</script>
</body>
</html>
let chartConfig = {
type: 'waterfall',
theme: 'classic',
backgroundColor: '#F1F2F4',
borderColor: '#B9BABC',
borderRadius: '3px',
borderWidth: '1px',
options: {
final: {
backgroundColor: '#5381B3',
},
intermediate: {
backgroundColor: '#5381B3',
},
line: {
lineGapSize: '4px',
lineSegmentSize: '4px',
lineStyle: 'dashed',
lineWidth: '1px',
},
negative: {
backgroundColor: '#CD3132',
},
positive: {
backgroundColor: '#739137',
},
},
plot: {
valueBox: {
text: '$%vk',
backgroundColor: '#FFF',
color: 'black',
shadow: false,
},
barWidth: '30px',
},
plotarea: {
marginTop: '20px',
marginRight: '20px',
borderColor: '#B9BABC',
borderWidth: '1px',
},
scaleX: {
backgroundColor: 'white',
guide: {
visible: false,
},
item: {
color: '#666',
offsetY: '0px',
rules: [
{
offsetY: '20px',
rule: '%i%2==0',
},
],
},
itemsOverlap: true,
labels: [
'Product Revenue',
'Services Revenue',
'Fixed Costs',
'Variable Costs',
'Total',
],
lineColor: '#B9BABC',
lineWidth: '1px',
offsetStart: '16px',
offsetEnd: '16px',
tick: {
visible: false,
},
},
scaleY: {
values: '0:700:140',
format: '%vK',
guide: {
lineStyle: 'solid',
},
item: {
color: '#666',
},
lineColor: '#B9BABC',
lineWidth: '1px',
tick: {
visible: false,
},
},
series: [
{
values: [420, 210, -170, -140, 'SUM'],
},
],
};
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});