DxSankey.SourceFieldName Property
Specifies the data source field that contains data for source nodes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue("source")]
[Parameter]
public string SourceFieldName { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | "source" | The name of the data source field. |
Remarks
The <DxSankey>
component displays data source values as nodes that have weights. Source and target nodes are connected with links that illustrate the weight flow between nodes.
Use the Data property to bind the Sankey component to a data source. To create nodes and links, specify the component’s SourceFieldName
, TargetFieldName, and WeightFieldName properties.
<DxSankey Data="@Data"
Width="100%"
Height="440px"
SourceFieldName="Source"
TargetFieldName="Target"
WeightFieldName="Weight">
<DxSankeyNodeSettings Width="8" Spacing="30" />
<DxSankeyLinkSettings ColorMode="SankeyLinkColorMode.Gradient" />
<DxTitleSettings Text="Commodity Turnover" />
</DxSankey>
@code {
IEnumerable<SankeyDataPoint> Data = Enumerable.Empty<SankeyDataPoint>();
protected override void OnInitialized() {
Data = GenerateData();
}
}
See Also