sim51 / react-sigma

Sigma React component
https://sim51.github.io/react-sigma/
Other
158 stars 27 forks source link

labelColor and edgeLabelColor not behaving as expected #34

Closed suryarastogi closed 1 year ago

suryarastogi commented 1 year ago

labelColor and edgeLabelColor not behaving as expected

Steps to reproduce

Use either of the following settings in a graph

settings={{
    edgeLabelColor: "#0f0",
    labelColor: "#f00"
  }}

Reproducible CodeSandbox link

Expected behaviour

Edge labels are coloured green and node labels are coloured red

Actual behaviour

Edge labels are coloured black and node labels are not legible

Note

I've used Sigma.js in the past but I'm somewhat new to React so there is a chance I may be using the library incorrectly

sim51 commented 1 year ago

Settings are wrong, try this instead :

settings={{
   labelColor: { color: "#f00" },
   edgeLabelColor: { color: "#f00" }
  }}
suryarastogi commented 1 year ago

Thank you! That works!