Series Point Colorizer

  • 2 minutes to read

The Colorizer defines colors for chart series points and stores them to the SeriesPoint.Color property.

ChartColorizerExample

IMPORTANT

When the Chart Control aggregates series data, the aggregated point has the color that mostly occurs on the aggregated interval.

Apply Colorizer

  1. Set the SeriesBase.ColorDataMember property to the name of a data member that determines series point colors.

Series_ColorDataMember

  1. Use the SeriesViewBase.Colorizer property to define a colorizer type. The following colorizers are available:

NOTE

For area and line series, the colorizer changes only markers' colors.

Color Object Colorizer

This is the default colorizer. You need to specify only the SeriesBase.ColorDataMember property to use it. The ColorDataMember field can contain the following values:

  • an integer ARGB color value;
  • 3 or 6 digit hex code;
  • a string color name;
  • a Color object.

The image below shows data colorized with colors from a data source:

ColorObjectColorizer

Key-Color Colorizer

Follow the steps below to configure the key-color colorizer.

You can use custom logic to assign color keys. Configure the KeyColorColorizer.KeyProvider property for this purpose.

The following image shows a bar chart colorized according to the country's region:

KeyColorColorizer

NOTE

The following example demonstrates this approach in action: How to: Colorize Charts with Key Color Colorizer.

Range Colorizer

Follow the steps below to configure the range colorizer.

You can use custom logic to provide numeric values based on ColorDataMember values. Specify the RangeColorizer.ValueProvider property for this purpose.

The following image shows a bar chart colorized by the Happy Planet Index:

RangeColorizer

NOTE

To view the complete range colorizer example, refer to the following help topic: How to: Colorize Charts Using the Range Colorizer.

See Also