Skip to main content
All docs
V24.2

DxSankey.TargetFieldName Property

Specifies the data source field that contains data for target nodes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue("target")]
[Parameter]
public string TargetFieldName { get; set; }

Property Value

Type Default Description
String "target"

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.

DxSankey - Nodes and Links

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