corelibraries-devexpress-dot-xtracharts-dot-sankey-d7ad0b32.md
A colorizer that allows you to specify a palette for a Sankey diagram.
Namespace : DevExpress.XtraCharts.Sankey
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public class SankeyPaletteColorizer :
SankeyColorizerBase,
IPaletteProvider,
ISankeyPaletteRepositoryProvider
Public Class SankeyPaletteColorizer
Inherits SankeyColorizerBase
Implements IPaletteProvider,
ISankeyPaletteRepositoryProvider
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
};
sankeyDiagramControl1.Colorizer = New SankeyPaletteColorizer With {
.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 };
Imports System.Drawing
'...
Dim palette As Palette = New Palette("Custom") From {
Color.Red,
Color.Green,
Color.Blue
}
sankeyDiagramControl1.Colorizer = New SankeyPaletteColorizer With {
palette
}
Object SankeyColorizerBase SankeyPaletteColorizer
See Also