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

Showing Node Labels without Edge Labels #1394

Open
Gykonik opened this issue Oct 26, 2023 · 1 comment
Open

Showing Node Labels without Edge Labels #1394

Gykonik opened this issue Oct 26, 2023 · 1 comment

Comments

@Gykonik
Copy link

Gykonik commented Oct 26, 2023

Is there a way to enforce node labels using graph.setNodeAttribute(nodeKey, "forceLabel", true) without simultaneously enforcing edge labels? I aim to have separate toggles for "Enforce Node Labels" and "Enforce Edge Labels". While the latter works as intended, the former inadvertently enforces all edge labels, which is undesirable.

Upon examining the Sigma.js code, I identified that this line triggers the automatic insertion of edge labels through the edgeLabelsToDisplayFromNodes function.

Currently, I haven't found any setting or customization option to prevent this behavior. Is there an existing solution, or should this be seen as a potential feature enhancement?

@f-gueguen
Copy link

This is the setting I use, works for me

        labelDensity: 1000, // magic number, it works and I didn't investigate much more
        labelRenderedSizeThreshold: 0, // display labels even if the node is small/zoomed out/packed
        renderLabels: true,
        renderEdgeLabels: false,

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

No branches or pull requests

2 participants