fkling / fkling/JSNetworkX

relabelNodes doesn't update the graph

Open
#80 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
779
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Hi,

I could draw graph as I expected, and I now want to update the node without deleting the node.

firstly, I want to use `relabelNodes `, the label of the node changed but not reflected in the graph.
```
G.nodes()
Array [ old1", "old2" ]
```
```
var mapping = {"old1": "new1"};
var H = jsnx.relabelNodes(G, mapping, false)
```
```
G.nodes()
Array [ new1", "old2" ]
```
The label seems to be updated, but the actual label doesn't change, it only changes with following
```
jsnx.draw(G)
```
but I don't want to redraw everything, just want to update the single label.
It would be very appreciated if someone can correct me.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.