<!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>
.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"]; // DEFINE DATA
// -----------------------------
let chartData = [{
text: 'Engor',
values: [null, 963, 949, 958, 950, 925, 930, 915, 945, 965, 949, 929, null],
lineColor: '#00013C',
marker: {
backgroundColor: '00013C',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Orxen',
values: [null, 870, 879, 863, 850, 845, 825, 830, 833, 824, 856, 869, null],
lineColor: '#80192D',
marker: {
backgroundColor: '#80192D',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Loloso',
values: [null, 719, 708, 745, 795, 785, 770, 780, 772, 759, 799, 751, null],
lineColor: '#FEDB97',
marker: {
backgroundColor: '#FEDB97',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Neden',
values: [null, 663, 649, 658, 650, 625, 630, 649, 655, 679, 624, 687, null],
lineColor: '#577E78',
marker: {
backgroundColor: '#577E78',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Essob',
values: [null, 570, 579, 563, 550, 545, 525, 530, 548, 596, 547, 541, null],
lineColor: '#423F4F',
marker: {
backgroundColor: '#423F4F',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Narora',
values: [null, 463, 449, 458, 450, 425, 430, 465, 489, 474, 454, 414, null],
lineColor: '#E88E46',
marker: {
backgroundColor: '#E88E46',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Heworen',
values: [null, 363, 349, 358, 350, 325, 330, 343, 313, 323, 359, 345, null],
lineColor: '#6546E8',
marker: {
backgroundColor: '#6546E8',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Ackald',
values: [null, 263, 249, 258, 250, 225, 230, 264, 262, 258, 231, 272, null],
lineColor: '#BEA37C',
marker: {
backgroundColor: '#BEA37C',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Atlor',
values: [null, 158, 186, 184, 170, 156, 145, 156, 154, 123, 138, 191, null],
lineColor: '#496DB5',
marker: {
backgroundColor: '#496DB5',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Ildebel',
values: [null, 40, 50, 55, 50, 26, 15, 49, 54, 69, 97, 72, null],
lineColor: '#CBA800',
marker: {
backgroundColor: '#CBA800',
borderColor: '#000000',
shadow: false
}
}
];
// CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'line',
backgroundColor: '#F8F0D8',
title: {
text: 'CO2 Concentration Analysis',
backgroundColor: 'none',
fontColor: '#000000',
fontSize: '18px',
height: '40px',
y: '10px'
},
legend: {
alpha: 0.5,
backgroundColor: '#FFFFFF',
borderColor: 'none',
item: {
paddingRight: '15px',
fontColor: '#000000'
},
layout: '2x5',
margin: '84% auto auto auto',
shadow: false
},
plot: {
aspect: 'stepped',
borderRadiusTopRight: '3px',
borderRadiusTopLeft: '3px',
hoverMarker: {
size: '6px'
},
hoverState: {
visible: false
},
legendMarker: {
type: 'circle',
size: '5px'
},
lineWidth: '2px',
marker: {
size: '5px'
},
scrollStepMultiplier: 1,
tooltip: {
borderRadius: '5px',
shadow: false
}
},
plotarea: {
alpha: 0.75,
backgroundColor: '#FBFBFB',
margin: '75px 60px 120px 130px'
},
scaleX: {
values: ['', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019', ''],
guide: {
lineColor: '#a6a6a6',
lineStyle: 'solid'
},
item: {
color: '#000000'
},
lineColor: '#a6a6a6',
lineWidth: 0,
tick: {
lineColor: '#a6a6a6',
lineWidth: '1px',
visible: false
}
},
scaleY: {
guide: {
lineColor: '#a6a6a6',
lineStyle: 'solid'
},
item: {
color: '#000000'
},
label: {
text: 'Intensity (g/kWh)',
paddingRight: '70px',
fontColor: '#000000',
fontSize: '12px'
},
lineColor: '#a6a6a6',
lineWidth: '1px',
maxValue: 1000,
minValue: 0,
tick: {
visible: false
},
zooming: true,
zoomTo: [0, 370]
},
shapes: [{
type: 'rectangle',
id: 'view_all',
alpha: 0.6,
backgroundColor: 'white',
borderColor: '#777',
borderWidth: '1px',
cursor: 'hand',
label: {
text: 'View All',
bold: true,
fontSize: '12px'
},
width: '75px',
height: '20px',
x: '86%',
y: '9%'
}],
tooltip: {
text: '%t: %v g/kWh'
},
scrollY: {
bar: {
alpha: 0.5,
backgroundColor: '#a6a6a6',
borderRadius: '3px',
width: '20px'
},
handle: {
backgroundColor: 'white',
borderLeft: '1px solid #a6a6a6',
borderRight: '1px solid #a6a6a6',
borderTop: '1px solid #a6a6a6',
borderBottom: '1px solid #a6a6a6',
borderRadius: '3px'
}
},
series: chartData
}
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: 'myChart',
data: chartConfig
});
// EVENTS
// -----------------------------
zingchart.shape_click = (p) => {
if (p.shapeid == 'view_all') {
zingchart.exec(p.id, 'viewall');
}
}
</script>
</body>
</html>
// DEFINE DATA
// -----------------------------
let chartData = [
{
text: 'Engor',
values: [null, 963, 949, 958, 950, 925, 930, 915, 945, 965, 949, 929, null],
lineColor: '#00013C',
marker: {
backgroundColor: '00013C',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Orxen',
values: [null, 870, 879, 863, 850, 845, 825, 830, 833, 824, 856, 869, null],
lineColor: '#80192D',
marker: {
backgroundColor: '#80192D',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Loloso',
values: [null, 719, 708, 745, 795, 785, 770, 780, 772, 759, 799, 751, null],
lineColor: '#FEDB97',
marker: {
backgroundColor: '#FEDB97',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Neden',
values: [null, 663, 649, 658, 650, 625, 630, 649, 655, 679, 624, 687, null],
lineColor: '#577E78',
marker: {
backgroundColor: '#577E78',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Essob',
values: [null, 570, 579, 563, 550, 545, 525, 530, 548, 596, 547, 541, null],
lineColor: '#423F4F',
marker: {
backgroundColor: '#423F4F',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Narora',
values: [null, 463, 449, 458, 450, 425, 430, 465, 489, 474, 454, 414, null],
lineColor: '#E88E46',
marker: {
backgroundColor: '#E88E46',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Heworen',
values: [null, 363, 349, 358, 350, 325, 330, 343, 313, 323, 359, 345, null],
lineColor: '#6546E8',
marker: {
backgroundColor: '#6546E8',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Ackald',
values: [null, 263, 249, 258, 250, 225, 230, 264, 262, 258, 231, 272, null],
lineColor: '#BEA37C',
marker: {
backgroundColor: '#BEA37C',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Atlor',
values: [null, 158, 186, 184, 170, 156, 145, 156, 154, 123, 138, 191, null],
lineColor: '#496DB5',
marker: {
backgroundColor: '#496DB5',
borderColor: '#000000',
shadow: false
}
},
{
text: 'Ildebel',
values: [null, 40, 50, 55, 50, 26, 15, 49, 54, 69, 97, 72, null],
lineColor: '#CBA800',
marker: {
backgroundColor: '#CBA800',
borderColor: '#000000',
shadow: false
}
}
];
// CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'line',
backgroundColor: '#F8F0D8',
title: {
text: 'CO2 Concentration Analysis',
backgroundColor: 'none',
fontColor: '#000000',
fontSize: '18px',
height: '40px',
y: '10px'
},
legend: {
alpha: 0.5,
backgroundColor: '#FFFFFF',
borderColor: 'none',
item: {
paddingRight: '15px',
fontColor: '#000000'
},
layout: '2x5',
margin: '84% auto auto auto',
shadow: false
},
plot: {
aspect: 'stepped',
borderRadiusTopRight: '3px',
borderRadiusTopLeft: '3px',
hoverMarker: {
size: '6px'
},
hoverState: {
visible: false
},
legendMarker: {
type: 'circle',
size: '5px'
},
lineWidth: '2px',
marker: {
size: '5px'
},
scrollStepMultiplier: 1,
tooltip: {
borderRadius: '5px',
shadow: false
}
},
plotarea: {
alpha: 0.75,
backgroundColor: '#FBFBFB',
margin: '75px 60px 120px 130px'
},
scaleX: {
values: ['', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019', ''],
guide: {
lineColor: '#a6a6a6',
lineStyle: 'solid'
},
item: {
color: '#000000'
},
lineColor: '#a6a6a6',
lineWidth: 0,
tick: {
lineColor: '#a6a6a6',
lineWidth: '1px',
visible: false
}
},
scaleY: {
guide: {
lineColor: '#a6a6a6',
lineStyle: 'solid'
},
item: {
color: '#000000'
},
label: {
text: 'Intensity (g/kWh)',
paddingRight: '70px',
fontColor: '#000000',
fontSize: '12px'
},
lineColor: '#a6a6a6',
lineWidth: '1px',
maxValue: 1000,
minValue: 0,
tick: {
visible: false
},
zooming: true,
zoomTo: [0, 370]
},
shapes: [
{
type: 'rectangle',
id: 'view_all',
alpha: 0.6,
backgroundColor: 'white',
borderColor: '#777',
borderWidth: '1px',
cursor: 'hand',
label: {
text: 'View All',
bold: true,
fontSize: '12px'
},
width: '75px',
height: '20px',
x: '86%',
y: '9%'
}
],
tooltip: {
text: '%t: %v g/kWh'
},
scrollY: {
bar: {
alpha: 0.5,
backgroundColor: '#a6a6a6',
borderRadius: '3px',
width: '20px'
},
handle: {
backgroundColor: 'white',
borderLeft: '1px solid #a6a6a6',
borderRight: '1px solid #a6a6a6',
borderTop: '1px solid #a6a6a6',
borderBottom: '1px solid #a6a6a6',
borderRadius: '3px'
}
},
series: chartData
}
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: 'myChart',
data: chartConfig
});
// EVENTS
// -----------------------------
zingchart.shape_click = (p) => {
if (p.shapeid == 'view_all') {
zingchart.exec(p.id, 'viewall');
}
}