use antv data

This commit is contained in:
huangtong.ht 2018-08-17 17:48:12 +08:00
parent 78182593eb
commit 7551a7435f
3 changed files with 27028 additions and 445 deletions

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@
prevOverlapping: true,
}
});
let nodeSizeMapper = new Mapper('node', 'userview', 'size', [20, 50], {
let nodeSizeMapper = new Mapper('node', 'weight', 'size', [20, 50], {
legendCfg: {
containerId: 'legend',
title: {
@ -41,10 +41,10 @@
layout: 'horizontal'
}
});
let edgeSizeMapper = new Mapper('edge', 'userview', 'size', [1, 16], {
let edgeSizeMapper = new Mapper('edge', 'weight', 'size', [1, 16], {
legendCfg: null
});
let nodeColorMapper = new Mapper('node', 'stayTime', 'color', ['#BAE7FF', '#1890FF', '#0050B3'], {
let nodeColorMapper = new Mapper('node', 'weight', 'color', ['#BAE7FF', '#1890FF', '#0050B3'], {
legendCfg: {
containerId: 'legend',
title: {
@ -75,13 +75,7 @@
},
height: 500,
});
console.log(data);
graph.read(Util.cloneDeep(data));
setTimeout(()=>{
graph.update('1965', {
x: 10000
});
},1000 )
});
</script>

View File

@ -15,6 +15,7 @@ class Plugin {
const graph = this.graph;
graph.on('afterchange', () => {
this._stashFreezeElement();
this.freezeSize();
});
graph.on('afterzoom', () => {
this.freezeSize();