Page MenuHomePhabricator

Investigate why not all edgeLabels shown on graph in a Wikibase query service
Open, Needs TriagePublic

Description

We suspect that this may actually be a feature of the visualization library to avoid overlapping edge labels.

Investigate:

  • if it is a feature, and if we can find it documented (or in the code)
  • if yes, whether it's configurable

Timebox: 4 hours

Event Timeline

Investigation Findings

The issue in the visualization is related to the improvedLayout feature in the vis.js library. This feature, enabled by default, influences node positioning and layout behavior.

improvedLayout Feature:

  • This feature uses the Kamada-Kawai algorithm to arrange nodes and reduce overlaps, enhancing visual clarity.
  • By default, there is a threshold of 150 nodes; beyond this limit, The feature removes or disables labels to maintain performance.

Next step

  • The threshold is not configurable in the original deprecated vis.js library. While disabling the improvedLayout feature for graphs exceeding 150 nodes is possible, it may negatively impact stabilization times.
  • Consider switching to a community-maintained version of vis.js, where the improvedLayout threshold is configurable. This would offer better support for large graphs.