Skip to content

Pushing new nodes to a graph/updating graph data #16

@RogerTangos

Description

@RogerTangos

Sorry if this is a noob react question. I'm trying to add and delete nodes and edges from an existing Sigma component. Currently, my component is set up as so:

<Sigma graph={{nodes:[{id:"n1", label:"Alice"}, {id:"n2", label:"Rabbit"}], edges:[{id:"e1",source:"n1",target:"n2",label:"SEES"}]}} settings={{drawEdges:true}}>
   <RelativeSize initialSize={15}/>
   <RandomizeNodePositions/>
</Sigma>

I can reach into the component and change Sigma.props.graph, but have trouble forcing the graph to re-render. How would you recommend doing this?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions