<!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>
html,
body,
#myChart {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id='myChart'></div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
var myConfig = {
"graphset": [{
"type": "line",
"plot": {
"exact": 1,
"shadow": 1,
"alpha": 1,
"shadow-distance": 1,
"stacked": 0,
"line-width": 2,
"slice-start": 15,
"animation": {
"delay": 10,
"effect": "3",
"speed": "500",
"method": "ANIMATION_BOUNCE_EASE_OUT",
"sequence": "0"
},
"value-box": {
"visible": 0,
"text": "%v",
"background-color": "#fff",
"border-color": "#999",
"border-width": 2,
"border-radius": 10,
"padding": 10,
"placement": "out"
},
"marker": {
"type": "circle"
}
},
"shapes": [{
"type": "rect",
"id": "animation",
"width": "100",
"height": "30",
"background-color": "#666 #333",
"border-radius": "10px",
"x": "50px",
"y": "15px",
"label": {
"text": "Start Animation",
"font-color": "#fff"
}
}],
"series": [{
"values": [118, 123, 46, 86, 116, 166, 29, 83, 96, 159, 91, 80, 142, 49, 88, 136, 102, 35, 166, 73, 156, 111, 27, 119, 47, 124, 84, 153, 99, 46, 124, 87, 109, 138, 47, 77, 44, 137, 103, 151, 89, 144, 51, 91, 78, 69, 48, 144, 20, 105]
},
{
"values": [98, 142, 103, 91, 109, 186, 130, 154, 143, 208, 175, 128, 191, 83, 125, 169, 173, 189, 189, 165, 128, 98, 80, 177, 187, 134, 109, 108, 174, 162, 102, 102, 107, 136, 161, 115, 189, 174, 156, 62, 198, 161, 127, 76, 126, 60, 201, 88, 82, 87]
},
{
"values": [162, 153, 218, 169, 136, 204, 112, 209, 172, 148, 242, 105, 149, 163, 220, 199, 244, 183, 143, 129, 247, 142, 116, 159, 227, 231, 157, 160, 225, 197, 206, 240, 197, 203, 141, 221, 154, 198, 227, 174, 248, 228, 176, 160, 157, 178, 219, 208, 144, 163]
},
{
"values": [243, 263, 248, 257, 229, 153, 186, 148, 288, 186, 161, 267, 147, 215, 180, 251, 243, 165, 223, 236, 204, 232, 224, 141, 216, 188, 238, 206, 157, 142, 257, 179, 240, 150, 223, 242, 171, 205, 140, 256, 152, 264, 188, 209, 239, 214, 248, 200, 193, 201]
}
]
}]
};
zingchart.render({
id: 'myChart',
data: myConfig,
height: "100%",
width: "100%"
});
zingchart.shape_click = function(p) {
if (p.shapeid == 'animation') {
zingchart.exec('myChart', 'reload');
}
}
</script>
</body>
</html>
var myConfig = {
"graphset": [{
"type": "line",
"plot": {
"exact": 1,
"shadow": 1,
"alpha": 1,
"shadow-distance": 1,
"stacked": 0,
"line-width": 2,
"slice-start": 15,
"animation": {
"delay": 10,
"effect": "3",
"speed": "500",
"method": "ANIMATION_BOUNCE_EASE_OUT",
"sequence": "0"
},
"value-box": {
"visible": 0,
"text": "%v",
"background-color": "#fff",
"border-color": "#999",
"border-width": 2,
"border-radius": 10,
"padding": 10,
"placement": "out"
},
"marker": {
"type": "circle"
}
},
"shapes": [{
"type": "rect",
"id": "animation",
"width": "100",
"height": "30",
"background-color": "#666 #333",
"border-radius": "10px",
"x": "50px",
"y": "15px",
"label": {
"text": "Start Animation",
"font-color": "#fff"
}
}],
"series": [{
"values": [118, 123, 46, 86, 116, 166, 29, 83, 96, 159, 91, 80, 142, 49, 88, 136, 102, 35, 166, 73, 156, 111, 27, 119, 47, 124, 84, 153, 99, 46, 124, 87, 109, 138, 47, 77, 44, 137, 103, 151, 89, 144, 51, 91, 78, 69, 48, 144, 20, 105]
},
{
"values": [98, 142, 103, 91, 109, 186, 130, 154, 143, 208, 175, 128, 191, 83, 125, 169, 173, 189, 189, 165, 128, 98, 80, 177, 187, 134, 109, 108, 174, 162, 102, 102, 107, 136, 161, 115, 189, 174, 156, 62, 198, 161, 127, 76, 126, 60, 201, 88, 82, 87]
},
{
"values": [162, 153, 218, 169, 136, 204, 112, 209, 172, 148, 242, 105, 149, 163, 220, 199, 244, 183, 143, 129, 247, 142, 116, 159, 227, 231, 157, 160, 225, 197, 206, 240, 197, 203, 141, 221, 154, 198, 227, 174, 248, 228, 176, 160, 157, 178, 219, 208, 144, 163]
},
{
"values": [243, 263, 248, 257, 229, 153, 186, 148, 288, 186, 161, 267, 147, 215, 180, 251, 243, 165, 223, 236, 204, 232, 224, 141, 216, 188, 238, 206, 157, 142, 257, 179, 240, 150, 223, 242, 171, 205, 140, 256, 152, 264, 188, 209, 239, 214, 248, 200, 193, 201]
}
]
}]
};
zingchart.render({
id: 'myChart',
data: myConfig,
height: "100%",
width: "100%"
});
zingchart.shape_click = function(p) {
if (p.shapeid == 'animation') {
zingchart.exec('myChart', 'reload');
}
}