dunnock / react-sigma

Lightweight React library for drawing network graphs built on top of SigmaJS
https://dunnock.github.io/react-sigma/
MIT License
258 stars 43 forks source link

Node type issues #104

Closed ericcarino closed 3 years ago

ericcarino commented 3 years ago

I'm having two separate issues w/ node types:

  1. Specifying a default type by adding the following tag does not appear to work for me. <NodeShapes default="star"/> I would expect when a type isn't specified for the node on the graph, it would default to star?
  2. If I specify the node type in the graph (like below), I only see the updated node shape on hover. On non-hover, it goes back to a circle. { id: "n1", label: "Alice", type: "star" }
ericcarino commented 3 years ago

Disregard, I quickly figured out the issue. I had to explicitly specify the renderer as canvas

<Sigma renderer="canvas"...

Canvas is the default, so I wouldn't have expected this is required.