feat(graph): add read

This commit is contained in:
yilin.qyl 2019-03-21 15:15:10 +08:00
parent db4448e3c8
commit deb7bda294

View File

@ -400,6 +400,15 @@ class Graph extends EventEmitter {
self.emit('afterrender');
}
/**
* 接收数据进行渲染
* @Param {Object} data 初始化数据
*/
read(data) {
this.data(data);
this.render();
}
/**
* 更改源数据根据新数据重新渲染视图
* @param {object} data 源数据