documentationfor yFiles for HTML 2.6

LabelStyleBase<TVisualextends Visual>

An abstract base class that makes it possible to easily implement a custom ILabelStyle.

Inheritance Hierarchy
LabelStyleBase
Implemented Interfaces

Remarks

Only createVisual and getPreferredSize need to be implemented by subclasses, however to improve rendering performance it is highly recommended to implement at least updateVisual, too.

This implementation differs from the straightforward ILabelStyle implementation in that there is no visible separation between the style and its ILabelStyleRenderer. Instead the renderer used by the base class is fixed and delegates all calls back to the style instance.

Related Programming Samples

Custom Styles
Shows how to create custom styles for nodes, edges, labels, ports, and edge arrows.
01 Rendering the Label Text
Visualize a label using a basic text element
04 Preferred Label Size
Let the label style set the desired label size
05 Render Performance
Optimize the render performance of the label style

Type Parameters

TVisual: Visual
The optional type of the created and updated by the and methods. This type argument can be omit, but specifying a more concrete type helps conveniently implementing with TypeScript.

Type Details

yfiles module
view-component
yfiles-umd modules
All view modules
Legacy UMD name
yfiles.styles.LabelStyleBase

See Also

Constructors

Properties

Methods

Static Methods