<!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 myConfigXb = {
"type": "mixed",
"plot": {
"bars-overlap": "100%",
"stacked": true,
},
"scale-x": {
"labels": ["Superior", "Michigan", "Huron", "Erie", "Ontario"],
"guide": {
"visible": false
}
},
"scale-y": {
"values": "0:50:10",
"guide": {
"visible": false
}
},
"series": [{ //Range Bar 1
"type": "bar",
"values": [25, 30, 15, 20, 25],
"stack": 1,
"background-color": "gray",
"alpha": 0.7,
"hover-state": {
"visible": false
},
"max-trackers": 0,
},
{ //Range Bar 2
"type": "bar",
"values": [20, 10, 30, 25, 15],
"stack": 1,
"background-color": "gray",
"alpha": 0.5,
"hover-state": {
"visible": false
},
"max-trackers": 0,
},
{ //Range Bar 3
"type": "bar",
"values": [5, 10, 5, 5, 10],
"stack": 1,
"background-color": "gray",
"alpha": 0.3,
"hover-state": {
"visible": false
},
"max-trackers": 0,
},
{ //Bullet Bar
"type": "bar",
"values": [35, 42, 40, 43, 36],
"bar-width": "50%",
"stack": 2,
"background-color": "black gray",
"hover-state": {
"visible": false
},
"tooltip": {
"text": "Actual: %v",
"font-color": "black",
"background-color": "white"
}
},
{ //Goal 1 (rectangle)
"type": "scatter",
"values": [21, 33, 25, 30, 12],
"marker": {
"type": "rectangle",
"background-color": "#333399",
"border-color": "none",
"height": "7%",
"width": "60%"
},
"tooltip": {
"text": "Rectangle Goal: %v",
"font-color": "black",
"background-color": "white"
}
},
{ //Goal 2 (diamond)
"type": "scatter",
"values": [30, 37, 30, 37, 25],
"marker": {
"type": "diamond",
"background-color": "#FF99CC",
"border-color": "#33CCFF",
"border-width": 3,
"size": 8
},
"tooltip": {
"text": "Diamond Goal: %v",
"font-color": "black",
"background-color": "white"
}
},
{ //Goal 3 (heart)
"type": "scatter",
"values": [39, 45, 36, 45, 40],
"marker": {
"background-image": "https://www.zingchart.com/resources/heart.png",
"background-color": "none",
"border-color": "none",
"background-repeat": "no-repeat",
"shadow": false,
"size": 12
},
"tooltip": {
"text": "Heart Goal: %v",
"font-color": "black",
"background-color": "white"
}
}
]
};
zingchart.render({
id: 'myChart',
data: myConfigXb,
height: "100%",
width: "100%"
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZingSoft Demo</title>
<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
</head>
<body>
<div id='myChart'></div>
</body>
</html>
html,
body,
#myChart {
height: 100%;
width: 100%;
}
var myConfigXb = {
"type": "mixed",
"plot": {
"bars-overlap": "100%",
"stacked": true,
},
"scale-x": {
"labels": ["Superior", "Michigan", "Huron", "Erie", "Ontario"],
"guide": {
"visible": false
}
},
"scale-y": {
"values": "0:50:10",
"guide": {
"visible": false
}
},
"series": [{ //Range Bar 1
"type": "bar",
"values": [25, 30, 15, 20, 25],
"stack": 1,
"background-color": "gray",
"alpha": 0.7,
"hover-state": {
"visible": false
},
"max-trackers": 0,
},
{ //Range Bar 2
"type": "bar",
"values": [20, 10, 30, 25, 15],
"stack": 1,
"background-color": "gray",
"alpha": 0.5,
"hover-state": {
"visible": false
},
"max-trackers": 0,
},
{ //Range Bar 3
"type": "bar",
"values": [5, 10, 5, 5, 10],
"stack": 1,
"background-color": "gray",
"alpha": 0.3,
"hover-state": {
"visible": false
},
"max-trackers": 0,
},
{ //Bullet Bar
"type": "bar",
"values": [35, 42, 40, 43, 36],
"bar-width": "50%",
"stack": 2,
"background-color": "black gray",
"hover-state": {
"visible": false
},
"tooltip": {
"text": "Actual: %v",
"font-color": "black",
"background-color": "white"
}
},
{ //Goal 1 (rectangle)
"type": "scatter",
"values": [21, 33, 25, 30, 12],
"marker": {
"type": "rectangle",
"background-color": "#333399",
"border-color": "none",
"height": "7%",
"width": "60%"
},
"tooltip": {
"text": "Rectangle Goal: %v",
"font-color": "black",
"background-color": "white"
}
},
{ //Goal 2 (diamond)
"type": "scatter",
"values": [30, 37, 30, 37, 25],
"marker": {
"type": "diamond",
"background-color": "#FF99CC",
"border-color": "#33CCFF",
"border-width": 3,
"size": 8
},
"tooltip": {
"text": "Diamond Goal: %v",
"font-color": "black",
"background-color": "white"
}
},
{ //Goal 3 (heart)
"type": "scatter",
"values": [39, 45, 36, 45, 40],
"marker": {
"background-image": "https://www.zingchart.com/resources/heart.png",
"background-color": "none",
"border-color": "none",
"background-repeat": "no-repeat",
"shadow": false,
"size": 12
},
"tooltip": {
"text": "Heart Goal: %v",
"font-color": "black",
"background-color": "white"
}
}
]
};
zingchart.render({
id: 'myChart',
data: myConfigXb,
height: "100%",
width: "100%"
});