Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label for edges #87

Open
rectangel-paul opened this issue Oct 18, 2019 · 1 comment
Open

Label for edges #87

rectangel-paul opened this issue Oct 18, 2019 · 1 comment

Comments

@rectangel-paul
Copy link

I'm working on my visualization project using JSNetworkx but cannot find a way to add label on the edges. Please someone help me.

@piglesias1
Copy link

piglesias1 commented May 14, 2020

Hi @rectangel-paul,

The issue is when updating the edge labels. During the creation process, it works fine. #70

A quick fix is to change the line 759 of the src/drawing/sgv.js with the following code:

  if (config.withEdgeLabels) {
    selection.selectAll('text')
      .attr(config.edgeLabelAttr)
      .style(config.edgeLabelStyle)
      .text(config.edgeLabels);
  }

If you want to get the already compiled (for browser) version with this fix, take it at:
https://github.com/piglesias1/JSNetworkX/blob/master/jsnetworkx.js

Hope it helps!

Thanks,
Pablo Iglesias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants