DynamicVoronoiHelper
DynamicVoronoiHelper
目前的standard-chart为单次渲染模式,两 次渲染间的状态不能做记录,所以框架为沃洛诺伊图与时间轴的联动做了一个辅助类DynamicVoronoiHelper
DynamicVoronoiHelper初始化在standardChart之后
const chart = standardChart.init('chart', 'pc-app-light');
const helper = new standardChart.helper.DynamicVoronoiHelper(
chart,
option,
data,
arg,
callback
);
初始化参数
即构造方法 standardChart.helper.DynamicVoronoiHelper:
| 参数配置 | 类型 | 默认值 | 描述 | 备注 |
|---|---|---|---|---|
| chart | StandardChart | 无 | 组件库的实例对象 | |
| option | Option | 沃洛诺伊图的配置项 | ||
| data | [[{"name": "服装制造","ids": "820253186","value": 32115,"percent": "96.39","color": "#f2a355"}]] | 沃洛诺伊图全周期数据 | 特别注意:ids字段值是唯一值;颜色通过color自定义 | |
| arg | Object | {name: {show: true,fontSize: 14,},value: { show: true,fontSize: 14,},percent: {show: true,fontSize: 14,}} | 定义label文本的显隐及大小 | |
| callback | Function | 无 | webworker计算完毕后的回调通知 | () => {} |