Closed SeXyTeA-x closed 9 months ago
Hmm... You can do it with click event that change the label based on the node.raw data and remember to do the same when it's deslected
Emmm... I use this,But it doesn't seem to work.
this.viz.registerOnEvent('clickNode',(e) => {
this.viz.updateWithFunction(function(){
e.node.raw.properties.name = 'aaa';
})
});
this.viz.registerOnEvent('clickNode',(e) => {
e.node.label = 'aaa';
});
No need the other stuff
I tried this method, but the label of the node didn't change
Yes, my bad
this.viz.registerOnEvent('clickNode',(e) => {
vis.nodes.update({id: e.node.id, label: 'aaa'})
});
Thank you. Problem solved
Since many of the node names in my data are too long, I use the following method to label nodes with '... 'carry on representation:
However, I hope that when the user's mouse selects a node, the name of this node can be fully displayed, may I ask whether this effect can be achieved