TextBlock
A visual element that renders text content. Extends VisualBase and provides functionality for creating and managing text graphics with font styling.
Definition
Package:@progress/kendo-react-diagram
Properties
alignable
boolean
Whether the text block can be aligned within its container.
drawingElement
Group | Text
The underlying drawing element for the text.
id
string
The unique identifier of the element.
options
any
Configuration options for the element.
textElements
Text[]
Array of text elements for multi-line text support.
Methods
Gets or sets the text content of the text block.
The new text content. If omitted, the current content is returned.
Returns:any
The current content when called without a value.
Gets the drawing container for this element.
any
The drawing element container
Sets the fill color and opacity of the visual element.
The fill color
opacity?anyThe fill opacity (optional)
Sets the position of the element from a point.
The new element position.
Sets the position of the element from coordinates.
The horizontal coordinate.
ynumberThe vertical coordinate.
Redraws the text block with updated options.
New options to apply to the text block
Sets the stroke color, width, and opacity of the visual element.
The stroke color
widthanyThe stroke width
opacityanyThe stroke opacity
Gets the visibility of the element.
boolean
true when the element is visible; otherwise, false.
Sets the visibility of the element.
Whether the element should be visible.