<!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>
.info {
padding: 1rem 0 0;
min-height: 529px;
background: #fff;
box-sizing: border-box;
}
.control-bar {
margin: 0 auto;
padding: 0 0 1rem;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity .3s;
flex-wrap: wrap;
}
.control-bar.loaded {
display: flex !important;
opacity: 1;
}
.control-bar>div {
display: flex;
align-items: center;
}
.control-bar>*+* {
margin-left: 10px;
}
.control-bar span {
margin-left: 7px;
display: inline-block;
}
.control-bar select {
min-width: 45px;
height: 40px;
background: #fff;
border: 1px solid #ebebeb;
border-radius: 4px;
}
.control-bar .sel-wide {
min-width: 60px;
}
.control-bar button {
min-width: 45px;
height: 40px;
cursor: pointer;
color: #fff;
background: #074361;
border: 1px solid #074361;
border-radius: 4px;
}
.zc-body {
background-color: #fff;
}
.zc-ref {
display: none;
}
</style>
</head>
<body class="zc-body">
<div class="info">
<div data-jsref="control-bar" class="control-bar" hidden>
<div>
<select data-jsref="elements">
<option value="4">4</option>
<option value="5">5</option>
<option value="6" selected="selected">6</option>
</select>
<span>elements, </span>
</div>
<div>
<select data-jsref="aperture" class="sel-wide">
<option value="180">180</option>
<option value="270" selected="selected">270</option>
<option value="360">360</option>
</select>
<span>aperture, starting at</span>
</div>
<div>
<select data-jsref="degrees" class="sel-wide">
<option value="0">0</option>
<option value="45">45</option>
<option value="90">90</option>
<option value="135" selected="selected">135</option>
<option value="180">180</option>
<option value="225">225</option>
<option value="270">270</option>
<option value="315">315</option>
</select>
<span>degrees, with</span>
</div>
<div>
<select data-jsref="effects">
<option value="-1">no animation</option>
<option value="0">effect 0</option>
<option value="1" selected="selected">effect 1</option>
<option value="2">effect 2</option>
<option value="3">effect 3</option>
<option value="4">effect 4</option>
</select>
,
</div>
<select data-jsref="sequence">
<option value="0">non-sequenced</option>
<option value="1" selected="selected">in sequence</option>
</select>
<button data-jsref="renderBtn">Render</button>
</div>
<div id="myChart">
<a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
</div>
</div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // DEFINE CHART LOCATIONS (IDS)
// -----------------------------
// Main chart render location
let chartId;
chartId = 'myChart';
// DATA
// -----------------------------
let oImgCenter =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAABpCAYAAAB1aADCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABBdEVYdENvbW1lbnQAQ1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gOTUKACMumAAAIBdJREFUeF7FfHecHdWV5lcv1Yv9+nW3uhVRsCSQyGCwwWAQaBiGDCbYw46xB8N6jMP4D++yw4xtWIfZZTBjsDUez3qMAx4nggODjY35kcz+yLKJIikgtdTdavXrlyvu9916T2rlbqn929NcVdW9t+49555zvntOVT2skIQ/AWlQlyVmrgCLJR6d/klpWgWq+Q5Q3YRadQNa1SGEtY1AayvgNSgZxUlkgEw/Urn5KBTnwMv0IJ+bO62CHrRAurlZ2YSxN36I5ubHEasNIuZupWY8WFagGRAgiZhOLY/nPu9J8phBkOpHWFyAwiFnIDHjFGS6FiBFVUqbB0r7FKjpuUgnku2rHaQbvMDB2Fs/R/n1e5AcfQYJNBFPJYDAJsvsI2GSllGMFcYQhAFCz4cVkF1ex60YhXbghRZ8j5pNFtHqPQWlZVci138i0rrxAGjKGlLnLWvvQ2X115Ctv4B4Ig0rQUHcFBwybc/0UShlYds2YrakkXg8BuxD8loOnKaPRqOBcCiGeqPO+4EU+1i+j0pIDc5cgdKRn0ZX7zLqcmo0JYGq4xuw+bFPIkWN2NkUfCvNVU7C9erIDtjoXdBL3n2uuMfeXHljPiHCIIzMj+cxasZoK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vR+C+lEbcJnZVv03tfBNWtgvV348i8VpIU2yh7yM3tkc4eJpWgVJ08sqSo2BfeR16r7sVzaU8pzmN/PMmwnrB/P4hYVW499iofncM6SS34NMvhr1g6t8j7I2mLcHr0MiLT6Hv8KN5lkLt1dUY/cz5yLUspD4xgOTpaVgxF9VHA/i3DaJmWZh757OIF3tNGDQdNK0aEvUQrTzt+KGP3KEU7LQLuLkCle9vRqxK03PScH4xjLQfwL7gQ0zbp08Y0bRrSL+/C4MkQ5/2E9HaKNZeeRx6vBTcs20UT+hD7aY3Mep5WPzrDbxjetd02jWkT5/1fzDTLy713Vs814PS1TfA90YReyzE6DfWUVgPXf/lo+x98NPraavP0qHp15C+BKGfMIWjtvQNQsz8suWNvzwGA8xU9WvMUQauc3/4HEFi94/OD5amXUP6BWM8SLWfD+jnGlF2M/vz/45tXgOtehmpSz78JxFGNO0C6UM/6HMynpqv42iC+pVRZulxyJx+KcZTKfSe8+Go7y4kY9lRGPYFCmWnRtMuUExi0MTMr0tYzIF/Yqzrqr8DLvo4kkS2SOQ9kwSiL3Ak81FNu3ZyNO0+9P+XgP8HyA4KdsBOwWMAAAAASUVORK5CYII=';
let sLine =
'\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F';
let aPalette = [
'#64D0DA',
'#34B2E4',
'#065381',
'#8B103E',
'#E34856',
'#FE912A',
];
let aGradientColors = [
'#2CC4D1',
'#0B98D0',
'#0B4366',
'#7B002C',
'#C8202F',
'#F97801',
];
let aTooltipText = [
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
];
// DOM ELEMENTS
// -----------------------------
let controlBar = document.querySelector('[data-jsref="control-bar"]');
let elements = document.querySelector('[data-jsref="elements"]');
let aperture = document.querySelector('[data-jsref="aperture"]');
let degrees = document.querySelector('[data-jsref="degrees"]');
let effects = document.querySelector('[data-jsref="effects"]');
let sequence = document.querySelector('[data-jsref="sequence"]');
let renderBtn = document.querySelector('[data-jsref="renderBtn"]');
// CHART CONFIG
// -----------------------------
let cData = {
type: 'pie',
plot: {
borderColor: '#FFF',
borderWidth: '10px',
detach: false,
hoverState: {
visible: false,
},
pieTransform: 'callout=22',
slice: '30%',
},
plotarea: {
backgroundImage: oImgCenter,
backgroundPosition: '50% 55%',
backgroundRepeat: 'no-repeat',
margin: 0,
},
scaleR: {
aperture: parseInt(aperture.value, 10),
refAngle: parseInt(degrees.value, 10),
},
resources: [{
type: 'css',
url: 'https://fonts.googleapis.com/css?family=Exo+2',
}, ],
series: [],
};
// RENDER CHARTS
// -----------------------------
// On load
render();
zingchart.load = function(e) {
controlBar.classList.add('loaded');
};
// On button click
renderBtn.addEventListener('click', render);
// HELPER FNS
// -----------------------------
function render() {
cData.scaleR = {
aperture: parseInt(aperture.value, 10),
refAngle: parseInt(degrees.value, 10),
}
let chartConfig = JSON.parse(JSON.stringify(cData));
if (effects.value !== '-1') {
chartConfig['plot'].animation = {
effect: parseInt(effects.value, 10),
method: 'ANIMATION_LINEAR',
sequence: parseInt(sequence.value, 10),
speed: 200
};
}
let items = parseInt(elements.value, 10);
for (let i = 0; i < items; i++) {
let no = i + 1;
chartConfig['series'].push({
values: [1],
backgroundColor: aPalette[i],
dataNo: no <= 9 ? '0' + no : no,
gradientColors: [
aGradientColors[i],
aGradientColors[i],
aPalette[i],
aPalette[i],
].join(' '),
gradientStops: [0.01, 0.4, 0.409, 0.99].join(' '),
tooltipText: aTooltipText[i],
valueBox: [{
width: 48,
height: 48,
align: 'center',
placement: 'fixed=60%;50%',
borderRadius: 23,
borderWidth: 0,
fontSize: 6,
shadow: false,
color: '#FFF',
decimals: 0,
fontFamily: '"Exo 2"',
text: '<span style="font-size:23px">%data-no</span><br>' +
sLine +
'<br><span style="font-size:11px;">\u2002\u2002SAMPLE TEXT</span>',
}, ],
});
}
zingchart.render({
id: chartId,
width: '100%',
height: '450px',
output: 'svg',
data: chartConfig,
});
}
</script>
</body>
</html>
// DEFINE CHART LOCATIONS (IDS)
// -----------------------------
// Main chart render location
let chartId;
chartId = 'myChart';
// DATA
// -----------------------------
let oImgCenter =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAABpCAYAAAB1aADCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABBdEVYdENvbW1lbnQAQ1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gOTUKACMumAAAIBdJREFUeF7FfHecHdWV5lcv1Yv9+nW3uhVRsCSQyGCwwWAQaBiGDCbYw46xB8N6jMP4D++yw4xtWIfZZTBjsDUez3qMAx4nggODjY35kcz+yLKJIikgtdTdavXrlyvu9916T2rlbqn929NcVdW9t+49555zvntOVT2skIQ/AWlQlyVmrgCLJR6d/klpWgWq+Q5Q3YRadQNa1SGEtY1AayvgNSgZxUlkgEw/Urn5KBTnwMv0IJ+bO62CHrRAurlZ2YSxN36I5ubHEasNIuZupWY8WFagGRAgiZhOLY/nPu9J8phBkOpHWFyAwiFnIDHjFGS6FiBFVUqbB0r7FKjpuUgnku2rHaQbvMDB2Fs/R/n1e5AcfQYJNBFPJYDAJsvsI2GSllGMFcYQhAFCz4cVkF1ex60YhXbghRZ8j5pNFtHqPQWlZVci138i0rrxAGjKGlLnLWvvQ2X115Ctv4B4Ig0rQUHcFBwybc/0UShlYds2YrakkXg8BuxD8loOnKaPRqOBcCiGeqPO+4EU+1i+j0pIDc5cgdKRn0ZX7zLqcmo0JYGq4xuw+bFPIkWN2NkUfCvNVU7C9erIDtjoXdBL3n2uuMfeXHljPiHCIIzMj+cxasZoKJ5AGHcQOhbqQxRkpAm30kLGojmGDdQ4RnzBX6P3hOuRT9pm/snQpAQSK1vW3Iny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7sVzaU8pzmN/PMmwnrB/P4hYVW499iofncM6SS34NMvhr1g6t8j7I2mLcHr0MiLT6Hv8KN5lkLt1dUY/cz5yLUspD4xgOTpaVgxF9VHA/i3DaJmWZh757OIF3tNGDQdNK0aEvUQrTzt+KGP3KEU7LQLuLkCle9vRqxK03PScH4xjLQfwL7gQ0zbp08Y0bRrSL+/C4MkQ5/2E9HaKNZeeRx6vBTcs20UT+hD7aY3Mep5WPzrDbxjetd02jWkT5/1fzDTLy713Vs814PS1TfA90YReyzE6DfWUVgPXf/lo+x98NPraavP0qHp15C+BKGfMIWjtvQNQsz8suWNvzwGA8xU9WvMUQauc3/4HEFi94/OD5amXUP6BWM8SLWfD+jnGlF2M/vz/45tXgOtehmpSz78JxFGNO0C6UM/6HMynpqv42iC+pVRZulxyJx+KcZTKfSe8+Go7y4kY9lRGPYFCmWnRtMuUExi0MTMr0tYzIF/Yqzrqr8DLvo4kkS2SOQ9kwSiL3Ak81FNu3ZyNO0+9P+XgP8HyA4KdsBOwWMAAAAASUVORK5CYII=';
let sLine =
'\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F\uFF3F';
let aPalette = [
'#64D0DA',
'#34B2E4',
'#065381',
'#8B103E',
'#E34856',
'#FE912A',
];
let aGradientColors = [
'#2CC4D1',
'#0B98D0',
'#0B4366',
'#7B002C',
'#C8202F',
'#F97801',
];
let aTooltipText = [
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
'Lorem ipsum',
];
// DOM ELEMENTS
// -----------------------------
let controlBar = document.querySelector('[data-jsref="control-bar"]');
let elements = document.querySelector('[data-jsref="elements"]');
let aperture = document.querySelector('[data-jsref="aperture"]');
let degrees = document.querySelector('[data-jsref="degrees"]');
let effects = document.querySelector('[data-jsref="effects"]');
let sequence = document.querySelector('[data-jsref="sequence"]');
let renderBtn = document.querySelector('[data-jsref="renderBtn"]');
// CHART CONFIG
// -----------------------------
let cData = {
type: 'pie',
plot: {
borderColor: '#FFF',
borderWidth: '10px',
detach: false,
hoverState: {
visible: false,
},
pieTransform: 'callout=22',
slice: '30%',
},
plotarea: {
backgroundImage: oImgCenter,
backgroundPosition: '50% 55%',
backgroundRepeat: 'no-repeat',
margin: 0,
},
scaleR: {
aperture: parseInt(aperture.value, 10),
refAngle: parseInt(degrees.value, 10),
},
resources: [
{
type: 'css',
url: 'https://fonts.googleapis.com/css?family=Exo+2',
},
],
series: [],
};
// RENDER CHARTS
// -----------------------------
// On load
render();
zingchart.load = function (e) {
controlBar.classList.add('loaded');
};
// On button click
renderBtn.addEventListener('click', render);
// HELPER FNS
// -----------------------------
function render() {
cData.scaleR = {
aperture: parseInt(aperture.value, 10),
refAngle: parseInt(degrees.value, 10),
}
let chartConfig = JSON.parse(JSON.stringify(cData));
if (effects.value !== '-1') {
chartConfig['plot'].animation = {
effect: parseInt(effects.value, 10),
method: 'ANIMATION_LINEAR',
sequence: parseInt(sequence.value, 10),
speed: 200
};
}
let items = parseInt(elements.value, 10);
for (let i = 0; i < items; i++) {
let no = i + 1;
chartConfig['series'].push({
values: [1],
backgroundColor: aPalette[i],
dataNo: no <= 9 ? '0' + no : no,
gradientColors: [
aGradientColors[i],
aGradientColors[i],
aPalette[i],
aPalette[i],
].join(' '),
gradientStops: [0.01, 0.4, 0.409, 0.99].join(' '),
tooltipText: aTooltipText[i],
valueBox: [
{
width: 48,
height: 48,
align: 'center',
placement: 'fixed=60%;50%',
borderRadius: 23,
borderWidth: 0,
fontSize: 6,
shadow: false,
color: '#FFF',
decimals: 0,
fontFamily: '"Exo 2"',
text:
'<span style="font-size:23px">%data-no</span><br>' +
sLine +
'<br><span style="font-size:11px;">\u2002\u2002SAMPLE TEXT</span>',
},
],
});
}
zingchart.render({
id: chartId,
width: '100%',
height: '450px',
output: 'svg',
data: chartConfig,
});
}