-->

how to gray out node images in a vis.js network

2019-07-30 13:05发布

问题:

I've been able to highlight different parts of a vis.js network by utilizing the mechanism shown in the vis.js documentation examples. However,I wonder if we can get the same sort of effect when images are used for representing network nodes -as opposed to basic node shapes- (a straightforward 'coloring' of the nodes, as in the examples, does not gray out the images).

回答1:

I'm the developer of the vis.js network module. Unfortunately there is no shortcut here. You'll have to generate b&w images of your images and change the image option to the greyscale image.

Another idea is to use the opacity, that does work for the images. If you have any more questions, please post them on our github page. We get emails from the issues and we like to use that to keep track of questions.

Cheers!



标签: vis.js