react-vis-network icon indicating copy to clipboard operation
react-vis-network copied to clipboard

How to define multi level parameters for Edge

Open dgarros opened this issue 7 years ago • 1 comments

Thanks for this library, it looks very interesting.

I was trying to change the color properties of an Edge but since it's a multi level parameters section I was not sure how to define it.

I tried but it didn't work

<Edge id={link.name} 
                  title={link.name} 
                  from={link.site_a} to={link.site_b} 
                  dashes="true"
                  color="{color: 'red', hover: '#301ef2', inherit: 'false'}" />

Thanks in advance for your help

dgarros avatar Sep 19 '18 23:09 dgarros

@dgarros You should pass an object as a prop color={{color: 'red', hover: '#301ef2', inherit: 'false'}}

B-R-Bender avatar Dec 22 '18 16:12 B-R-Bender