use antv data

This commit is contained in:
TomHuangCN 2018-08-17 17:48:12 +08:00
parent ae81b74887
commit dc73ca831d
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, prevOverlapping: true,
} }
}); });
let nodeSizeMapper = new Mapper('node', 'userview', 'size', [20, 50], { let nodeSizeMapper = new Mapper('node', 'weight', 'size', [20, 50], {
legendCfg: { legendCfg: {
containerId: 'legend', containerId: 'legend',
title: { title: {
@ -41,10 +41,10 @@
layout: 'horizontal' layout: 'horizontal'
} }
}); });
let edgeSizeMapper = new Mapper('edge', 'userview', 'size', [1, 16], { let edgeSizeMapper = new Mapper('edge', 'weight', 'size', [1, 16], {
legendCfg: null legendCfg: null
}); });
let nodeColorMapper = new Mapper('node', 'stayTime', 'color', ['#BAE7FF', '#1890FF', '#0050B3'], { let nodeColorMapper = new Mapper('node', 'weight', 'color', ['#BAE7FF', '#1890FF', '#0050B3'], {
legendCfg: { legendCfg: {
containerId: 'legend', containerId: 'legend',
title: { title: {
@ -75,13 +75,7 @@
}, },
height: 500, height: 500,
}); });
console.log(data);
graph.read(Util.cloneDeep(data)); graph.read(Util.cloneDeep(data));
setTimeout(()=>{
graph.update('1965', {
x: 10000
});
},1000 )
}); });
</script> </script>

View File

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