Back to Devexpress

SunburstControl.Colorizer Property

windowsforms-devexpress-dot-xtratreemap-dot-sunburstcontrol-222e04b2.md

latest4.7 KB
Original Source

SunburstControl.Colorizer Property

Gets or sets the colorizer used to color the Sunburst’s segments.

Namespace : DevExpress.XtraTreeMap

Assembly : DevExpress.XtraTreeMap.v25.2.UI.dll

NuGet Package : DevExpress.Win.TreeMap

Declaration

csharp
[XtraSerializableProperty(XtraSerializationVisibility.Hidden)]
public ISunburstColorizer Colorizer { get; set; }
vb
<XtraSerializableProperty(XtraSerializationVisibility.Hidden)>
Public Property Colorizer As ISunburstColorizer

Property Value

TypeDescription
ISunburstColorizer

The object that implements the ISunburstColorizer interface.

|

Example

This example demonstrates how to use SunburstGradientColorizer to color sunburst items.

The Gradient Colorizer colorizes sunburst items or item groups using gradients. Color intensity depends on item value. Assign a SunburstGradientColorizer object to the SunburstControl.Colorizer property to color sunburst items using gradients.

You can use the SunburstGradientColorizer.Min and SunburstGradientColorizer.Max properties to set the color transparency for items with minimum and maximum values.

Use the SunburstGradientColorizer.Mode property to specify a gradient distribution mode.

The SunburstGradientColorizer.GradientColor property sets the color that is mixed with an item’s color.

Use the SunburstPaletteColorizerBase.Palette property to define a palette the colorizer uses to paint items.

csharp
sunburst.Colorizer = new SunburstGradientColorizer {
    Min = 0.6,
    Max = 1,
    Mode = GradientColorizerMode.ByGroupLevel,
    GradientColor = Color.White,
    Palette = Palette.Office2019Palette
};
vb
sunburst.Colorizer = New SunburstGradientColorizer With {
    .Min = 0.6,
    .Max = 1,
    .Mode = GradientColorizerMode.ByGroupLevel,
    .GradientColor = Color.White
    .Palette = Palette.Office2019Palette
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Colorizer property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/SunburstChart/SunburstItemControlProvider.cs#L67

csharp
void ClearDataBindings() {
    sunburst.Colorizer = null;
    dataAdapter.DataSource = dataAdapter.ValueDataMember = dataAdapter.LabelDataMember = null;

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/SunburstChart/SunburstItemControlProvider.vb#L76

vb
Private Sub ClearDataBindings()
    sunburst.Colorizer = Nothing
    dataAdapter.LabelDataMember = Nothing

See Also

SunburstControl Class

SunburstControl Members

DevExpress.XtraTreeMap Namespace