<!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: 'Bucks',
rank: 11,
ranks: [10, 13, 2, 8, 10],
},
{
text: 'Raptors',
rank: 8,
ranks: [9, 10, 9, 6, 5],
},
{
text: 'Warriors',
rank: 4,
ranks: [7, 8, 10, 1, 8],
},
{
text: 'Nuggets',
rank: 7,
ranks: [1, 11, 8, 9, 7],
},
{
text: 'Rockets',
rank: 9,
ranks: [11, 4, 6, 14, 4],
},
{
text: 'Blazers',
rank: 12,
ranks: [3, 15, 5, 11, 14],
},
{
text: '76ers',
rank: 5,
ranks: [4, 3, 11, 4, 13],
},
{
text: 'Jazz',
rank: 3,
ranks: [2, 1, 15, 7, 6],
},
{
text: 'Celtics',
rank: 1,
ranks: [14, 5, 1, 2, 3],
},
{
text: 'Thunder',
rank: 13,
ranks: [12, 14, 14, 10, 1],
},
{
text: 'Pacers',
rank: 6,
ranks: [5, 9, 7, 12, 2],
},
{
text: 'Clippers',
rank: 15,
ranks: [13, 7, 13, 15, 12],
},
{
text: 'Spurs',
rank: 10,
ranks: [6, 12, 4, 3, 15],
},
{
text: 'Nets',
rank: 14,
ranks: [15, 6, 12, 13, 9],
},
{
text: 'Magic',
rank: 2,
ranks: [8, 2, 3, 5, 11],
},
];
// DEFINE CHART LOCATIONS (IDS)
// -----------------------------
let myChart = 'myChart';
// CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'rankflow',
theme: 'classic',
backgroundColor: '#FFFFFF',
title: {
text: 'NBA Team Stats (Western Conference) | As Of 2018-2019',
backgroundColor: '#333',
},
options: {
colorType: 'palette',
palette: [
'#F05133',
'#F0163A',
'#000000',
'#CE1138',
'#146AA2',
'#e65f20',
'#FFCC33',
'#0b60ad',
'#50c878',
'#002b5c',
'#fdb827',
'#7399C6',
'#4A2583',
'#753BBD',
'#00275D',
],
style: {
labelOverall: {
text: 'OVERALL RANK',
},
itemOverall: {
fontWeight: 'bold',
},
},
},
plotarea: {
margin: '45px 20px 20px 30px',
},
scaleX: {
values: ['Rebounds', 'Assists', 'Steals', 'Blocks', 'Turnovers'],
item: {
fontColor: '#000',
},
labels: ['REB', 'AST', 'ST', 'BLK', 'TO'],
},
series: chartData,
};
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: myChart,
data: chartConfig,
});
</script>
</body>
</html>
// DEFINE DATA
// -----------------------------
let chartData = [
{
text: 'Bucks',
rank: 11,
ranks: [10, 13, 2, 8, 10],
},
{
text: 'Raptors',
rank: 8,
ranks: [9, 10, 9, 6, 5],
},
{
text: 'Warriors',
rank: 4,
ranks: [7, 8, 10, 1, 8],
},
{
text: 'Nuggets',
rank: 7,
ranks: [1, 11, 8, 9, 7],
},
{
text: 'Rockets',
rank: 9,
ranks: [11, 4, 6, 14, 4],
},
{
text: 'Blazers',
rank: 12,
ranks: [3, 15, 5, 11, 14],
},
{
text: '76ers',
rank: 5,
ranks: [4, 3, 11, 4, 13],
},
{
text: 'Jazz',
rank: 3,
ranks: [2, 1, 15, 7, 6],
},
{
text: 'Celtics',
rank: 1,
ranks: [14, 5, 1, 2, 3],
},
{
text: 'Thunder',
rank: 13,
ranks: [12, 14, 14, 10, 1],
},
{
text: 'Pacers',
rank: 6,
ranks: [5, 9, 7, 12, 2],
},
{
text: 'Clippers',
rank: 15,
ranks: [13, 7, 13, 15, 12],
},
{
text: 'Spurs',
rank: 10,
ranks: [6, 12, 4, 3, 15],
},
{
text: 'Nets',
rank: 14,
ranks: [15, 6, 12, 13, 9],
},
{
text: 'Magic',
rank: 2,
ranks: [8, 2, 3, 5, 11],
},
];
// DEFINE CHART LOCATIONS (IDS)
// -----------------------------
let myChart = 'myChart';
// CHART CONFIG
// -----------------------------
let chartConfig = {
type: 'rankflow',
theme: 'classic',
backgroundColor: '#FFFFFF',
title: {
text: 'NBA Team Stats (Western Conference) | As Of 2018-2019',
backgroundColor: '#333',
},
options: {
colorType: 'palette',
palette: [
'#F05133',
'#F0163A',
'#000000',
'#CE1138',
'#146AA2',
'#e65f20',
'#FFCC33',
'#0b60ad',
'#50c878',
'#002b5c',
'#fdb827',
'#7399C6',
'#4A2583',
'#753BBD',
'#00275D',
],
style: {
labelOverall: {
text: 'OVERALL RANK',
},
itemOverall: {
fontWeight: 'bold',
},
},
},
plotarea: {
margin: '45px 20px 20px 30px',
},
scaleX: {
values: ['Rebounds', 'Assists', 'Steals', 'Blocks', 'Turnovers'],
item: {
fontColor: '#000',
},
labels: ['REB', 'AST', 'ST', 'BLK', 'TO'],
},
series: chartData,
};
// RENDER CHARTS
// -----------------------------
zingchart.render({
id: myChart,
data: chartConfig,
});