自定义系列:沃洛诺伊图
v0.4.4+
option配置示例
const option = {
animationDurationUpdate: 2000,
xAxis: {
show: false
},
yAxis: {
show: false
},
graphic: {
elements: [
]
},
grid: {
bottom: 0,
right: 0,
top: 0,
left: 0
},
tooltip: {},
series: [{
type: 'custom',
dvType: 'voronoi',
dvRadius: 150,
universalTransition: {
enabled: true,
}
},
{
type: 'custom',
dvType: 'voronoi',
dvRadius: 150,
universalTransition: {
enabled: false,
}
},
]
}
const chart = standardChart.init('chart', 'pc-app-light');
const arg = {
name: {
show: true,
fontSize: 10,
},
value: {
show: false,
fontSize: 12,
},
percent: {
show: false,
fontSize: 12,
},
}
const callback = function(){
console.log('webwoker计算完毕通知')
};
const helper = new standardChart.helper.DynamicVoronoiHelper(
chart,
option,
data,
arg,
callback
);
helper.play()
辅助函数DynamicVoronoiHelper
参数介绍详情见DynamicVoronoiHelper