mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 12:49:04 +08:00
feat(graph): add read
This commit is contained in:
parent
db4448e3c8
commit
deb7bda294
@ -400,6 +400,15 @@ class Graph extends EventEmitter {
|
||||
self.emit('afterrender');
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收数据进行渲染
|
||||
* @Param {Object} data 初始化数据
|
||||
*/
|
||||
read(data) {
|
||||
this.data(data);
|
||||
this.render();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更改源数据,根据新数据重新渲染视图
|
||||
* @param {object} data 源数据
|
||||
|
Loading…
Reference in New Issue
Block a user