DxSankey.PaletteExtensionMode Property
Specifies how to extend the component’s palette when the number of colors is less than the number of nodes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(ChartPaletteExtensionMode.Blend)]
[Parameter]
public PaletteExtensionMode PaletteExtensionMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
PaletteExtensionMode | Blend | An enumeration value. |
Available values:
Name | Description |
---|---|
Alternate | Repeats the full set of palette colors. Alternates normal, lightened, and darkened shades (in that order). |
Blend | Blends two adjacent colors and inserts the new color between these colors in the palette. |
Extrapolate | Repeats the full set of palette colors. Gradually changes their shades from dark to light. |
Remarks
Use the PaletteExtensionMode
property to specify how to extend the component’s palette specified by the Palette property.
Example
The following code snippet applies a custom palette to Sankey nodes and changes the palette’s extension mode:
<DxSankey Data="@Data"
Width="100%"
Height="440px"
SourceFieldName="Source"
TargetFieldName="Target"
WeightFieldName="Weight"
Palette="@(new string[]{"red", "blue"})"
PaletteExtensionMode="PaletteExtensionMode.Blend">
<DxSankeyNodeSettings Width="8" Spacing="30" />
<DxTitleSettings Text="Commodity Turnover" />
</DxSankey>
@code {
IEnumerable<SankeyDataPoint> Data = Enumerable.Empty<SankeyDataPoint>();
protected override void OnInitialized() {
Data = GenerateData();
}
}