<!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 {
display: inline-block;
min-height: 530px;
width: 49%;
height: 100%;
}
.zc-ref {
display: none;
}
</style>
</head>
<body>
<div id="myChart1" class="chart--container">
<a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
</div>
<div id="myChart2" class="chart--container">
<a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
</div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
let chartConfig1 = {
type: 'bar',
title: {
text: 'Click A Node',
},
plot: {
cursor: 'pointer',
selectedState: {
backgroundColor: '#1DE9B6',
borderColor: 'grey',
borderWidth: '4px',
},
selectionMode: 'plot',
},
series: [{
values: [35, 42, 67, 89, 25, 34, 67, 85],
backgroundColor: '#009688',
}, ],
};
let chartConfig2 = {
type: 'gauge',
scaleR: {
values: '0:100:20',
center: {
backgroundColor: '#009688',
borderWidth: '0px',
},
},
series: [{
values: [35],
backgroundColor: '#009688',
}, ],
};
zingchart.bind('myChart1', 'node_click', function(e) {
zingchart.exec('myChart2', 'setseriesvalues', {
plotindex: 0,
values: [e.value],
});
});
zingchart.render({
id: 'myChart1',
data: chartConfig1,
height: '100%',
width: '100%',
});
zingchart.render({
id: 'myChart2',
data: chartConfig2,
height: '100%',
width: '100%',
});
</script>
</body>
</html>
let chartConfig1 = {
type: 'bar',
title: {
text: 'Click A Node',
},
plot: {
cursor: 'pointer',
selectedState: {
backgroundColor: '#1DE9B6',
borderColor: 'grey',
borderWidth: '4px',
},
selectionMode: 'plot',
},
series: [
{
values: [35, 42, 67, 89, 25, 34, 67, 85],
backgroundColor: '#009688',
},
],
};
let chartConfig2 = {
type: 'gauge',
scaleR: {
values: '0:100:20',
center: {
backgroundColor: '#009688',
borderWidth: '0px',
},
},
series: [
{
values: [35],
backgroundColor: '#009688',
},
],
};
zingchart.bind('myChart1', 'node_click', function (e) {
zingchart.exec('myChart2', 'setseriesvalues', {
plotindex: 0,
values: [e.value],
});
});
zingchart.render({
id: 'myChart1',
data: chartConfig1,
height: '100%',
width: '100%',
});
zingchart.render({
id: 'myChart2',
data: chartConfig2,
height: '100%',
width: '100%',
});