DxSankeyLabelSettings Class
Contains settings for DxSankey node labels.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public class DxSankeyLabelSettings :
DxComplexSettingsComponent<DxSankeyLabelSettings, SankeyLabelSettingsModel>,
IModelProvider<BorderSettingsModel>,
IModelProvider<FontSettingsModel>,
IModelProvider<ShadowSettingsModel>
Remarks
Use the DxSankeyLabelSettings
component to configure node labels for the DxSankey component. Add a DxSankeyLabelSettings
object to sankey markup to access label settings. To hide labels, set the Visible property to false
.
- DxSankey
DxSankeyLabelSettings
Component-Level Settings
The DxSankeyLabelSettings
component allows you to specify the following properties at the component level:
- Visible
- Specifies whether node labels are visible.
- HorizontalOffset | VerticalOffset
- Specify the label position.
- Overlap
- Specifies how the component displays overlapped labels.
- UseNodeColors
- Specifies whether to apply the node color to the node label’s text.
Nested Objects
In addition to component-level settings, you can also add the following objects to DxSankeyLabelSettings
markup:
- DxFontSettings
- Customizes label font settings
- DxShadowSettings
- Configures label shadows
- DxBorderSettings
- Shows and configures label text borders
Note
The DxBorderSettings.LineStyle property does not affect text borders of DxSankey labels.
Example
The following code snippet customizes DxSankey node labels:
<DxSankey Data="@Data"
Width="100%"
Height="440px"
SourceFieldName="Source"
TargetFieldName="Target"
WeightFieldName="Weight">
<DxSankeyNodeSettings Width="8" Spacing="30" />
<DxSankeyLabelSettings HorizontalOffset="20">
<DxFontSettings Size="18" Color="white"/>
<DxBorderSettings Visible="true" Color="black"/>
<DxShadowSettings Blur="3" Color="black" VerticalOffset="5" />
</DxSankeyLabelSettings>
<DxSankeyLinkSettings ColorMode="SankeyLinkColorMode.Gradient" />
<DxTitleSettings Text="Commodity Turnover" />
</DxSankey>
@code {
IEnumerable<SankeyDataPoint> Data = Enumerable.Empty<SankeyDataPoint>();
protected override void OnInitialized() {
Data = GenerateData();
}
}