<!doctype html>
<html class="zc-html">
<head>
<meta charset="utf-8">
<title>ZingSoft Demo</title>
<script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
<style>
.zc-body {
background-color: #fff;
}
.chart--container {
height: 100%;
width: 100%;
min-height: 530px;
}
.zc-ref {
display: none;
}
.zingchart-tooltip {
padding: 7px 5px;
background-color: #fff;
border-radius: 1px;
border: 1px solid #dcdcdc;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
line-height: 20px;
-webkit-font-smoothing: antialiased;
}
.zingchart-tooltip .scalex-value {
color: #838383;
font-size: 14px !important;
font-weight: normal !important;
line-height: 24px;
}
.zingchart-tooltip .scaley-value {
color: #4184f3;
font-size: 24px !important;
font-weight: normal !important;
}
</style>
</head>
<body class="zc-body">
<div id="myChart" class="chart--container">
<a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
</div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'bar',
backgroundColor: '#fff',
plot: {
tooltip: {
text: "<div class='zingchart-tooltip'><div class='scalex-value'>%kt</div><div class='scaley-value'>$%v</div></div>",
padding: '0px',
backgroundColor: 'none',
htmlMode: true,
placement: 'node:center',
},
stacked: true,
},
scaleX: {
values: ['Cats', 'Dogs', 'Fish', 'Birds'],
guide: {
visible: false,
},
item: {
fontColor: '#999',
},
lineColor: 'none',
lineWidth: '0px',
tick: {
visible: false,
},
},
scaleY: {
guide: {
lineStyle: 'solid',
},
item: {
fontColor: '#999',
},
lineColor: 'none',
lineWidth: '0px',
maxValue: '495px',
minValue: '0px',
step: 123.75,
tick: {
visible: false,
},
},
series: [{
values: [100, 180, 120, 120],
alpha: 1,
backgroundColor: '#4184f3',
hoverState: {
backgroundColor: '#2956A0',
},
},
{
values: [125, 125, 125, 125],
alpha: 1,
backgroundColor: '#db4437',
hoverState: {
backgroundColor: '#901E15',
},
},
{
values: [125, 145, 135, 165],
alpha: 1,
backgroundColor: '#f4b400',
borderRadiusTopLeft: '3px',
borderRadiusTopRight: '3px',
hoverState: {
backgroundColor: '#8C6A0B',
},
},
],
};
chartConfig.plot.animation = {
method: 'LINEAR',
delay: 0,
effect: 'ANIMATION_EXPAND_VERTICAL',
sequence: 'ANIMATION_BY_PLOT_AND_NODE',
speed: 10,
};
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});
</script>
</body>
</html>
// CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'bar',
backgroundColor: '#fff',
plot: {
tooltip: {
text: "<div class='zingchart-tooltip'><div class='scalex-value'>%kt</div><div class='scaley-value'>$%v</div></div>",
padding: '0px',
backgroundColor: 'none',
htmlMode: true,
placement: 'node:center',
},
stacked: true,
},
scaleX: {
values: ['Cats', 'Dogs', 'Fish', 'Birds'],
guide: {
visible: false,
},
item: {
fontColor: '#999',
},
lineColor: 'none',
lineWidth: '0px',
tick: {
visible: false,
},
},
scaleY: {
guide: {
lineStyle: 'solid',
},
item: {
fontColor: '#999',
},
lineColor: 'none',
lineWidth: '0px',
maxValue: '495px',
minValue: '0px',
step: 123.75,
tick: {
visible: false,
},
},
series: [
{
values: [100, 180, 120, 120],
alpha: 1,
backgroundColor: '#4184f3',
hoverState: {
backgroundColor: '#2956A0',
},
},
{
values: [125, 125, 125, 125],
alpha: 1,
backgroundColor: '#db4437',
hoverState: {
backgroundColor: '#901E15',
},
},
{
values: [125, 145, 135, 165],
alpha: 1,
backgroundColor: '#f4b400',
borderRadiusTopLeft: '3px',
borderRadiusTopRight: '3px',
hoverState: {
backgroundColor: '#8C6A0B',
},
},
],
};
chartConfig.plot.animation = {
method: 'LINEAR',
delay: 0,
effect: 'ANIMATION_EXPAND_VERTICAL',
sequence: 'ANIMATION_BY_PLOT_AND_NODE',
speed: 10,
};
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});