Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
[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 - Apply a custom palette

<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();
    }
}
See Also