neovis.js icon indicating copy to clipboard operation
neovis.js copied to clipboard

Node Type Legend

Open shalevv123 opened this issue 3 years ago • 2 comments

Is there anyway you could get a color legend? for example in the picture: Screenshot_199 can you somehow display a map like: pink- > test blue -> code yellow -> requirement

shalevv123 avatar Jun 01 '22 20:06 shalevv123

@shalevv123 Try like this:

neovis.registerOnEvent('completed', () => {
  neovis.edges.updateOnly( neovis.edges.get().filter( getTestEdges() ).map(edge => ( {...edge, color:"pink" } ) ) );
});

getTestEdges(x) {
 return x.raw.labels.includes("Test")
}

LukasRasmussen avatar Jun 30 '22 08:06 LukasRasmussen

@LukasRasmussen not what he asked for 😅 I don't think vis.js allow to read auto node/edge color but I can search

thebestnom avatar Jun 30 '22 14:06 thebestnom