[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Collapse]Sunburst Control
   [Expand]Getting Started
    Provide Data
    Colorizers
    Highlight and Select Items
   [Expand]Examples
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Colorizers

Colorizers allow the Sunburst control to automatically color its items. Sunburst provides Palette and Gradient colorizers. These colorizers come with their own options that define how to distribute colors across items in the same group. Items are considered to be a group if they have the common parent item.

This document consists of the following sections.

Expanded Overview

Sunburst colorizers inherit the ISunburstColorizer interface. Assign an ISunburstColorizer descendant to the SunburstControl.Colorizer property to specify the sunburst item colorizer.

Colorizers use colors from the palette the SunburstPaletteColorizerBase.Palette property defines. The following table lists the predefined palettes.

BlueGreenPalette

BlueIPalette

BluePalette

BlueWarmPalette

ChameleonPalette

DXTreeMapPalette

GreenPalette

GreenYellowPalette

InAFogPalette

MarqueePalette

NatureColorsPalette

NorthernLightsPalette

OfficePalette

Office2013Palette

Office2016Palette

Office2019Palette

OrangePalette

OrangeRedPalette

PastelKitPalette

RedOrangePalette

RedPalette

RedVioletPalette

SlipstreamPalette

TerracottaPiePalette

TheTreesPalette

VioletIPalette

VioletPalette

YellowOrangePalette

YellowPalette

 

 

Use the Palette.CreatePalette method to create a new palette.

The Sunburst control allows you to develop a custom colorizer. Create a class that inherits the ISunburstColorizer interface, and implement its ISunburstColorizer.GetItemColor method.

Expanded Palette Colorizer

The Palette Colorizer provides the sunburst's items with colors using a palette. The SunburstPaletteColorizer class stores Palette Colorizer's options.

Use the SunburstPaletteColorizer.VaryColorInGroup property to define how to color items in the same root group. The images below show how VaryColorInGroup operates.

Value Example Description
VaryColorInGroup = false Items have an equal color if they belong to the same top-level item.
VaryColorInGroup = true The first item in a group uses the first color in the palette. Each subsequent item in the group uses the next color in the palette.

The following code shows how to use the Sunburst's Palette Colorizer.

The example above uses the following API members.

Member Description
SunburstControl.Colorizer Gets or sets the colorizer used to color sunburst items.
SunburstPaletteColorizer The colorizer that colors sunburst items using a palette.
SunburstPaletteColorizer.VaryColorInGroup Specifies whether to color items within one group by the same color.

Expanded Gradient Colorizer

The Gradient Colorizer colors sunburst items using gradients. The SunburstGradientColorizer class stores the Gradient Colorizer's options. You can use the SunburstGradientColorizer.Min and SunburstGradientColorizer.Max properties to set the color transparency for items with minimum and maximum values.

The Gradient colorizer's mode defines how apply a gradient across items.

Mode Example Description
GradientColorizerMode.ByGroupLevel (default) Items have an equal base color if they belong to the same top-level item. A color's transparency increases from the top-level items to low-level items.
GradientColorizerMode.ByItemIndex Items in the same group have an equal base color. A color's transparency increases with increasing an item index in this group.

The Gradient colorizer allows you to specify SunburstGradientColorizer.GradientColor, which is mixed with each item color.

The following code configures a gradient colorizer and assigns it to a sunburst.

The table below lists the API member the code above uses.

Member Description
SunburstControl.Colorizer Gets or sets the colorizer used to color sunburst items.
SunburstGradientColorizer The colorizer that colors sunburst items using gradients.
SunburstGradientColorizer.Min Specifies the color transparency of an item with the minimum value (should be in the [0,1] range).
SunburstGradientColorizer.Max Specifies the color transparency of an item with the maximum value (should be in the [0,1] range).
SunburstGradientColorizer.Mode Specifies how to distribute a gradient across items.
GradientColorizerMode Lists gradient distribution modes.
SunburstGradientColorizer.GradientColor Gets or sets the color that is blended with an item's color.

Is this topic helpful?​​​​​​​