<!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: #f24c4c;
}
.chart--container {
height: 100%;
width: 100%;
min-height: 530px;
}
.zc-ref {
display: none;
}
</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: 'pie',
backgroundColor: '#f24c4c',
borderRadius: '4px',
plot: {
tooltip: {
fontColor: '#333',
rules: [{
text: '%v Created',
borderRadius: '4px',
rule: '%p == 0',
shadow: false,
},
{
text: '%v Left',
borderRadius: '4px',
rule: '%p == 1',
shadow: false,
},
],
},
valueBox: {
visible: false,
},
animation: {
effect: 'ANIMATION_EXPAND_LEFT',
sequence: 'ANIMATION_BY_PLOT_AND_NODE',
},
detach: false,
hoverState: {
visible: false,
},
refAngle: 270,
slice: '50%',
},
plotarea: {
margin: 'dynamic',
},
labels: [{
text: 'CPU 1',
alpha: 0.7,
anchor: 'c',
fontColor: '#fff',
fontSize: '30px',
x: '50%',
y: '62%',
},
{
text: '30',
fontColor: 'white',
fontFamily: 'Avenir',
fontSize: '70px',
offsetX: '-15px',
textAlign: 'center',
width: '100%',
y: '36%',
},
{
text: '%',
alpha: 0.8,
fontColor: 'white',
fontFamily: 'Avenir',
fontSize: '40px',
offsetX: '40px',
textAlign: 'center',
width: '100%',
y: '38%',
},
],
valueBox: {
visible: true,
},
series: [{
values: [30],
backgroundColor: '#fff',
borderWidth: '0px',
fillType: 'radial',
gradientColors: 'white white #ff9b99 white',
gradientStops: '0.2 0.5 0.5',
shadow: false,
},
{
values: [70],
valueBox: {
visible: false,
},
backgroundColor: '#fff',
borderWidth: '1px',
shadow: false,
slice: 155,
},
],
};
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});
</script>
</body>
</html>
// CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'pie',
backgroundColor: '#f24c4c',
borderRadius: '4px',
plot: {
tooltip: {
fontColor: '#333',
rules: [{
text: '%v Created',
borderRadius: '4px',
rule: '%p == 0',
shadow: false,
},
{
text: '%v Left',
borderRadius: '4px',
rule: '%p == 1',
shadow: false,
},
],
},
valueBox: {
visible: false,
},
animation: {
effect: 'ANIMATION_EXPAND_LEFT',
sequence: 'ANIMATION_BY_PLOT_AND_NODE',
},
detach: false,
hoverState: {
visible: false,
},
refAngle: 270,
slice: '50%',
},
plotarea: {
margin: 'dynamic',
},
labels: [{
text: 'CPU 1',
alpha: 0.7,
anchor: 'c',
fontColor: '#fff',
fontSize: '30px',
x: '50%',
y: '62%',
},
{
text: '30',
fontColor: 'white',
fontFamily: 'Avenir',
fontSize: '70px',
offsetX: '-15px',
textAlign: 'center',
width: '100%',
y: '36%',
},
{
text: '%',
alpha: 0.8,
fontColor: 'white',
fontFamily: 'Avenir',
fontSize: '40px',
offsetX: '40px',
textAlign: 'center',
width: '100%',
y: '38%',
},
],
valueBox: {
visible: true,
},
series: [{
values: [30],
backgroundColor: '#fff',
borderWidth: '0px',
fillType: 'radial',
gradientColors: 'white white #ff9b99 white',
gradientStops: '0.2 0.5 0.5',
shadow: false,
},
{
values: [70],
valueBox: {
visible: false,
},
backgroundColor: '#fff',
borderWidth: '1px',
shadow: false,
slice: 155,
},
],
};
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});