Skip to content

Edge Labels without node labels #1527

@paulgirard

Description

@paulgirard

Trying to render edge labels only by disabling node labels does not work

Sigma.js version: 3.0.2 (from latest commit)

Steps to reproduce

Edit the custom rendering story to :

  • option 1 : add renderLabels :false in settings
  • option 2 : replace labels in node data definition by null or undefined

Expected behavior

Edge labels are rendered. Nodes' labels are not.

Actual behavior

No labels at all.

Note

This is due to the fact that we are using the node labels selection algorithm to chose which edge labels to draw.
This is done in the edgeLabelsToDisplayFromNodes where we check that the edge source or node is in the displayedNodeLabels variables.
This implied that no node labels => no edge labels.

To allow showing edge labels without any node labels but still using this algo can be achieved by settings node labels data to empty strings: hacky workaround.

See gephi/gephi-lite#265

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions