Class DiagramDataMapSetting
Maps the data from the data source to the diagram layout nodes.
Inheritance
System.Object
Syncfusion.Blazor.Diagrams.Internal.SfDiagramBaseExtension
DiagramDataMapSetting
Inherited Members
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class DiagramDataMapSetting : SfDiagramBaseExtension, IBaseInit
Remarks
Based on the user-defined JSON (Local) data, the diagram is populated. This can be done only by mapping the local data to Data Source fields. |
Examples
<SfDiagram>
<DiagramDataSource Id = "Name" ParentId="Category" DataSource="@DataSource" DataMapSettings="@Datamap">
<DiagramDataMapSettings>
<DiagramDataMapSetting Property = "Annotations[0].Content" Field="Name"></DiagramDataMapSetting>
</DiagramDataMapSettings>
</DiagramDataSource>
</SfDiagram>
@code{
public class HierarchicalDetails
{
public string Name { get; set; }
public string FillColor { get; set; }
public string Category { get; set; }
}
List<DiagramDataMapSetting> Datamap { get; set; } = new List<DiagramDataMapSetting>()
{
new DiagramDataMapSetting() { Property = "Shape.TextContent", Field = "Name" }
};
///Create the data source with node name and fill color values.
public List<object> DataSource = new List<object>()
{
new HierarchicalDetails(){ Name ="Diagram", Category="",FillColor="#916DAF"},
};
}
Constructors
DiagramDataMapSetting()
Declaration
public DiagramDataMapSetting()
Properties
ChildContent
Represents a segment of UI content, implemented.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment |
Field
Defines the Fields for the Data source item to be mapped with Node.
Declaration
public string Field { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
<SfDiagram>
<DiagramDataSource>
<DiagramDataMapSettings>
//Set the field in DiagramDataMapSetting
<DiagramDataMapSetting Field="Name"></DiagramDataMapSetting>
</DiagramDataMapSettings>
</DiagramDataSource>
</SfDiagram>
//Create the data map settings.
new List<DiagramDataMapSetting>()
{
new DiagramDataMapSetting() { Field = "Name" }
};
jsProperty
Declaration
protected override string jsProperty { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Syncfusion.Blazor.Diagrams.Internal.SfDiagramBaseExtension.jsProperty
mainParent
Declaration
protected override SfDiagramBaseExtension mainParent { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.Blazor.Diagrams.Internal.SfDiagramBaseExtension |
Overrides
Syncfusion.Blazor.Diagrams.Internal.SfDiagramBaseExtension.mainParent
Property
Defines the property mapped with the data source items value.
Declaration
public string Property { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
<SfDiagram>
<DiagramDataSource>
<DiagramDataMapSettings>
//Set the property in DiagramDataMapSetting
<DiagramDataMapSetting Property="Annotations[0].Content"></DiagramDataMapSetting>
</DiagramDataMapSettings>
</DiagramDataSource>
</SfDiagram>
//Create the data map settings.
new List<DiagramDataMapSetting>()
{
new DiagramDataMapSetting() { Property = "Shape.TextContent"}
};
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Dispose()
Declaration
public override void Dispose()
Overrides
Syncfusion.Blazor.Diagrams.Internal.SfDiagramBaseExtension.Dispose()
GetJSNamespace()
Declaration
public string GetJSNamespace()
Returns
Type | Description |
---|---|
System.String | Get the parent namespaces |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component is ready to start, having received its initial parameters from its parent in the render tree |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties |