ClassTelerikDiagram
A component for creating interactive diagrams with shapes and connections. Configure id via Id and handle user interaction with OnShapeClick and OnConnectionClick. Provides serialization APIs: SaveAsJsonAsync() to export and LoadFromJsonAsync(string) to import diagram state. Children: DiagramShapes, DiagramConnections, DiagramShapeDefaults, DiagramConnectionDefaults, DiagramLayout.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikDiagram : DataVizComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentDataVizComponentTelerikDiagram
Implements:
Inherited Members
Constructors
TelerikDiagram()
Declaration
public TelerikDiagram()
Properties
ConnectionsData
Specifies the connections data.
Declaration
[Parameter]
public List<DiagramConnectionDescriptor> ConnectionsData { get; set; }
Property Value
Id
Specifies the id of the component.
MaxZoom
The maximum zoom level in percentages. The user will not be allowed to zoom in past this level.
Declaration
[Parameter]
public double? MaxZoom { get; set; }
Property Value
MinZoom
The minimum zoom level in percentages. The user will not be allowed to zoom out past this level. You can see an example in zoomMax.
Declaration
[Parameter]
public double? MinZoom { get; set; }
Property Value
OnConnectionClick
Specifies the connection click event.
Declaration
[Parameter]
public EventCallback<DiagramConnectionClickEventArgs> OnConnectionClick { get; set; }
Property Value
OnConnectionDragEnd
Fires when the user finishes dragging connections in the Diagram. Provides information about the connections that were dragged and the connection handle, if applicable.
Declaration
[Parameter]
public EventCallback<DiagramConnectionDragEndEventArgs> OnConnectionDragEnd { get; set; }
Property Value
OnConnectionDragStart
Fires when the user starts dragging connections in the Diagram. Provides information about the connections that started being dragged and the connection handle, if applicable.
Declaration
[Parameter]
public EventCallback<DiagramConnectionDragStartEventArgs> OnConnectionDragStart { get; set; }
Property Value
OnShapeClick
Specifies the shape click event.
Declaration
[Parameter]
public EventCallback<DiagramShapeClickEventArgs> OnShapeClick { get; set; }
Property Value
OnShapeDragEnd
Fires when the user finishes dragging shapes in the Diagram. Provides information about the shapes that were dragged.
Declaration
[Parameter]
public EventCallback<DiagramShapeDragEndEventArgs> OnShapeDragEnd { get; set; }
Property Value
OnShapeDragStart
Fires when the user starts dragging shapes in the Diagram. Provides information about the shapes that started being dragged.
Declaration
[Parameter]
public EventCallback<DiagramShapeDragStartEventArgs> OnShapeDragStart { get; set; }
Property Value
ShapesData
Specifies the shapes data.
Declaration
[Parameter]
public List<DiagramShapeDescriptor> ShapesData { get; set; }
Property Value
Zoom
The default zoom level of the Diagram in percentages.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
LoadFromJsonAsync(string)
Loads the diagram from JSON.
SaveAsJsonAsync()
Saves the diagram as JSON.