datastorm-open / visNetwork

R package, using vis.js library for network visualization
Other
542 stars 127 forks source link

Color ONE edge with gradient based on continuous values #438

Open liezeltamon opened 2 years ago

liezeltamon commented 2 years ago

Hi,

Haven't had any luck after searching around for a long time but could be also because this might require some vis.js/javascript knowledge. So just wanted to ask for some tips/ideas I can look into!

Is it possible to color ONE edge using a gradient or different colors? So for example half of an edge could represent a value of 50 and the other half a value of 10. So I'd want the first half to be dark red, while the other half a lighter red.

I've been using visNetwork (thanks for the hard work on this!) to represent DNA segments, and it would be really nice if the network can represent continuous values from certain molecular processes. For instance I can colour the network based on breakage rates at different areas of the segment.

Thanks so much!