-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No labels on edges after loading from json #482
Comments
Running into this same issue - the type seems to be ignored when loading from json. Did you ind a workaround? |
Are you using the |
Testing further, the difference happens on the sigma constructor. If the map parameter is sent as on the main site's example:
the graph is rendered but the edge settings are not applied. If instead we send a renderer parameter:
then the edge settings are indeed respected. It appears to be the missing {renderer: { type: 'canvas'} } that does it. (Removed my previous intermediate comment to avoid having someone else who's looking into this get sidetracked) |
@ricardojmendez, if I record correctly, the edge labels do not work with webgl currently and only with canvas. So yes, it seems that your first example does not register the renderer correctly as a canvas renderer. I do not remember the polymorphism you show in your first example but I guess it should be correct since shown on the documentation. There is something fishy here with the constructor indeed. As a dirty workaround you can force sigma to use the canvas renderer by default by doing this: sigma.renderers.def = sigma.renderers.canvas; |
Hi @Yomguithereal, Thanks. I worked around it changing the parameter for the parser to include the renderer map. To clarify, I'm not 100% the constructor does support passing type as a outside of the renderer. It does support passing container as a name. Where things might get confusing for new users is that the default example is passing:
Where the confusion might come for new users is that one can't just pass a renderer map with the type - this is an invalid combination:
Perhaps a note stating on the README.md for edgeLabels stating that webgl is not supported, and that it must be explicitly set to canvas, would help newcomers. Seems like this issue can be closed, since it's down to a capability misunderstanding (@AbeHandler's original example also did not explicitly state that canvas should be used). |
how to add tooltips to this |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I try to load this json:
with...
The nodes render correctly, but the edge labels do not. I know that you can add edges like this:
But is it possible to load the edge labels from JSON?
The text was updated successfully, but these errors were encountered: