<!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"];
let chartConfig = {
type: 'treemap',
plotarea: {},
tooltip: {},
options: {
thousandsSeparator: '--',
maxChildren: 9999,
maxDepth: 9999,
},
series: [{
text: 'North America',
legendMarker: {
backgroundColor: 'red'
},
children: [{
text: 'United States',
children: [{
text: 'Texas',
value: 2125
},
{
text: 'California',
value: 5323
},
{
text: 'Ohio',
value: 1223
},
{
text: 'New York',
value: 4665
},
{
text: 'Michigan',
value: 3923
},
{
text: 'Alabama',
value: 2543
}
]
},
{
text: 'Canada',
value: 11311
},
{
text: 'Mexico',
value: 7877
}
]
},
{
text: 'Europe',
children: [{
text: 'France',
value: 4254
},
{
text: 'Spain',
value: 2845
},
{
text: 'Switzerland',
value: 1389
},
{
text: 'Germany',
value: 5623
},
{
text: 'Cyprus',
value: 723
}
]
},
{
text: 'Africa',
children: [{
text: 'Egypt',
value: 2276
},
{
text: 'Congo',
value: 3837
},
{
text: 'Lesotho',
value: 943
}
]
},
{
text: 'Asia',
children: [{
text: 'India',
value: 9233
},
{
text: 'China',
value: 6890
},
{
text: 'Mongolia',
value: 2534
}
]
},
{
text: 'South America',
children: [{
text: 'Brazil',
value: 4265
},
{
text: 'Argentina',
value: 2855
},
{
text: 'Peru',
value: 1522
},
{
text: 'Uruguay',
value: 3311
}
]
},
{
text: 'Australia (continent)',
children: [{
text: 'Australia (country)',
value: 12189
},
{
text: 'New Zealand',
value: 2495
}
]
}
]
};
zingchart.render({
id: 'myChart',
data: chartConfig,
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%;
}
let chartConfig = {
type: 'treemap',
plotarea: {},
tooltip: {},
options: {
thousandsSeparator: '--',
maxChildren: 9999,
maxDepth: 9999,
},
series: [{
text: 'North America',
legendMarker: {
backgroundColor: 'red'
},
children: [{
text: 'United States',
children: [{
text: 'Texas',
value: 2125
},
{
text: 'California',
value: 5323
},
{
text: 'Ohio',
value: 1223
},
{
text: 'New York',
value: 4665
},
{
text: 'Michigan',
value: 3923
},
{
text: 'Alabama',
value: 2543
}
]
},
{
text: 'Canada',
value: 11311
},
{
text: 'Mexico',
value: 7877
}
]
},
{
text: 'Europe',
children: [{
text: 'France',
value: 4254
},
{
text: 'Spain',
value: 2845
},
{
text: 'Switzerland',
value: 1389
},
{
text: 'Germany',
value: 5623
},
{
text: 'Cyprus',
value: 723
}
]
},
{
text: 'Africa',
children: [{
text: 'Egypt',
value: 2276
},
{
text: 'Congo',
value: 3837
},
{
text: 'Lesotho',
value: 943
}
]
},
{
text: 'Asia',
children: [{
text: 'India',
value: 9233
},
{
text: 'China',
value: 6890
},
{
text: 'Mongolia',
value: 2534
}
]
},
{
text: 'South America',
children: [{
text: 'Brazil',
value: 4265
},
{
text: 'Argentina',
value: 2855
},
{
text: 'Peru',
value: 1522
},
{
text: 'Uruguay',
value: 3311
}
]
},
{
text: 'Australia (continent)',
children: [{
text: 'Australia (country)',
value: 12189
},
{
text: 'New Zealand',
value: 2495
}
]
}
]
};
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%'
});