chevron_right Demos chevron_right Hierarchical Layout with Edge Labeling
Related demos
Book a live Demo

Live Demo — yFiles in Action

30–45 min | Online | No install required

For Developers, Product Mangers & Executives

  • Interactive graph visualization in real time
  • Integration example
  • Live Q&A and next step recommendations

30–45 minutes | 1:1 or team session | Online (Zoom / Teams)

No install required | We show live code

Book a free live demo

Live Demo — yFiles in Action

30–45 min | Online | No install required

For Developers, Product Mangers & Executives

30–45 minutes | 1:1 or team session | Online (Zoom / Teams)

No install required | We show live code

Book a free live demo

Hierarchical Layout with Edge Labeling

This demo shows how to configure the HierarchicalLayout for automatic edge label placements.

Label Placement

Label models and their parameters control where labels appear. For manual placement, it's common to use models that limit possible positions. However, for automatic layout, it's best to use unrestricted models like FreeEdgeLabelModel for maximum flexibility.

You can further guide label placement using EdgeLabelPreferredPlacement, which specifies preferences such as placing labels near the edge's source or target, on a particular side, or with a specific rotation.

In this demo, each label is placed according to its text. Note that the default prevention of upside-down labels is turned off to enable rotation of Upside down and Upwards labels.

Things to Try

Demos

Documentation