Open PrimosK opened 6 years ago
Facing same issue. Cannot start with hidden label, and show only if node/edge is selected.
What I noticed: It is working if set from selectNode event!
var options = {
....
font: { size: 0 },
}
network = new vis.Network(container, data, options);
...
network.on('selectNode', (event, properties, senderId) => {
...
const options = this.body.data.edges._data[edgeId];
options.font.size = 12;
network.clustering.updateEdge(edgeId, options);
});
But chosen: { label: function (....
does not work, function gets called but label stays invisible.
Vis.js version: 4.21.0 Browser: all browsers
I've stumbled on the issue where font size of chosen node is not taken into account when following options are set:
Note that font size of selected edge is changed properly if initial font size for all edges is > 4..
JSFiddle demonstrating the issue: http://jsfiddle.net/61yjhorx/8/
What I was trying to achieve: https://stackoverflow.com/questions/32690394/how-to-hide-label-in-edge-in-visjs-graph/52204535#52204535