The interface used in an IGraph implementation for labels.
Remarks
IGraph
, this item supports the lookup method that can be used to query additional aspects of the item.Examples
Related Reading in the Developer's Guide
The graph model with all relevant types and their relationships is presented in detail in the section The Graph Model.
Using the look-up mechanism is explained in the section Service Locator Pattern: Lookup.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.ILabel
See Also
Properties
Gets the index of the label at its owner.
Gets a snapshot of the current layout of the label.
Remarks
<0,-1>
), it coincides with its lower left corner. The positioning of the label is determined using a pair of ILabelModel and ILabelModelParameter. In order to modify the layout of a label instance, set another layoutParameter for this label or modify its associated instance.See Also
Gets the label model's parameter that determines the positioning of this label.
Remarks
Note that the label model parameter instance associated with a label instance may be shared between multiple label instances and that the modification of this instance or its model will result in a change of the positioning of all labels that are associated with the same parameter or model instance.
To change the layout parameter for instances of the default implementation that were created via the factory methods on IGraph, use the setLabelLayoutParameter method.
Examples
See Also
Gets the owner of this label.
Remarks
Examples
See Also
Gets the preferred size of the label with respect to its current contents and the implementation of the visualization.
Remarks
Often the layout's size will be the same as the preferred size, but it's up to the implementation of the ILabelModel to interpret it differently.
To change the preferred size for instances of the default implementation that were created via the factory methods on IGraph, use the setLabelPreferredSize method.
Examples
See Also
Gets the style that is responsible for the visual representation of this node in a CanvasComponent.
Remarks
Note that the style instance associated with a label instance may be shared between multiple label instances and that the modification of this style will result in a change of the appearance of all labels that are associated with the same style instance.
To change the style for instances of the default implementation that were created via the factory methods on IGraph, use the setStyle method.
Examples
See Also
Gets or sets the tag associated with this instance.
Remarks
Examples
See Also
Implements
Gets the text string associated with this label.
Remarks
It is up to the visualization engine to interpret this property for the visualization of the label. Normally, it will render the text into the layout of this instance.
To change the text for instances of the default implementation that were created via the factory methods on IGraph, use the setLabelText method.
Examples
See Also
Methods
Returns an instance that implements the given type or null
.
Remarks
null
implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
$class
property on JavaScript classes inheriting from yFiles classes is only valid once an instance of this subclass was created. Call fixType, first or instantiate the class at least once.