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 shape click event.
Declaration
[Parameter]
public EventCallback<DiagramConnectionClickEventArgs> OnConnectionClick { get; set; }
Property Value
OnShapeClick
Specifies the shape click event.
Declaration
[Parameter]
public EventCallback<DiagramShapeClickEventArgs> OnShapeClick { 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.