in packages/showcase/treemap/dynamic-treemap.js [26:44]
function _getRandomData(total) {
const totalLeaves = total || Math.random() * 20;
const leaves = [];
for (let i = 0; i < totalLeaves; i++) {
leaves.push({
name: total ? total : String(Math.random()).slice(0, 3),
size: Math.random() * 1000,
color: Math.random(),
style: {
border: 'thin solid red'
}
});
}
return {
title: '',
color: 1,
children: leaves
};
}