mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 03:38:20 +08:00
use antv data
This commit is contained in:
parent
ae81b74887
commit
dc73ca831d
File diff suppressed because it is too large
Load Diff
@ -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>
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user