Skip to main content
All docs
V25.1
  • SankeyPaletteColorizer Class

    A colorizer that allows you to specify a palette for a Sankey diagram.

    Namespace: DevExpress.XtraCharts.Sankey

    Assembly: DevExpress.XtraCharts.v25.1.dll

    NuGet Package: DevExpress.Charts

    Declaration

    public class SankeyPaletteColorizer :
        SankeyColorizerBase,
        IPaletteProvider,
        ISankeyPaletteRepositoryProvider

    Remarks

    The Sankey diagram control uses the SankeyPaletteColorizer to color nodes. A new color from the palette is applied to each node with a unique label. Colors repeat if the number of unique labels exceeds the number of palette colors. To apply a gradient fill to links, the control utilizes the source and target node colors.

    Specify the Palette property to change colors that are used to paint a Sankey diagram. You can select one of the predefined palettes.

    To paint links with the same color, use the LinkColor property.

    The code below specifies a diagram’s palette and link color:

    sankeyDiagramControl1.Colorizer = new SankeyPaletteColorizer {
        Palette = Palettes.NorthernLights,
        LinkColor = Color.Gray
    };
    

    You can also create a new palette as follows:

    using System.Drawing;
    //...
        Palette palette = new Palette("Custom") {
            Color.Red,
            Color.Green,
            Color.Blue
        };
        sankeyDiagramControl1.Colorizer = new SankeyPaletteColorizer { Palette = palette };
    

    Implements

    Inheritance

    Object
    SankeyColorizerBase
    SankeyPaletteColorizer
    See Also