Chart Colorizers
Chart colorizers are components added to a chart that allows for automatic coloring of the chart based on its data. There are two categories of colorizer:
- Series Point Colorizers : these colorizers paint the series points and bars on a graph.
- Segment Colorizers : these colorizers paint the lines between points on line and area graphs.
Series Point Colorizers
The Series Point Colorizer is used to choose colors for chart series points automatically. This can be useful, for example, for providing additional information using color.
Important
When the Chart Control aggregates series data, the aggregated point has the color that mostly occurs on the aggregated interval.
Perform the following steps before using this feature:
- Specify the column name that determines the color of the series' Color Data Member property.
- Determine which type of a colorizer an application should use:
- Color Object Colorizer allows you to provide color data member values to the SeriesPoint.Color property if these values have the Color type or a type that can be converted to a color (integer number or string).
- Key Color Colorizer allows you to choose the color depending on color data member values used as key values.
- Range Colorizer allows you to colorize points depending on the color data member values' range.
After you select a colorizer type, assign the selected colorizer type's object to the SeriesViewBase.Colorizer property, and customize the colorizer's settings. The sections below describe how to do this.
Note
A colorizer is used to color only markers for area and line series views.
Color Object Colorizer
This colorizer does not require specifying properties before using it. The following image demonstrates data colorized using a national color stored in the data source:
Note
This is the default colorizer and is what is used when the Colorizer property is blank.
Key-Color Colorizer
Select the 'KeyColorColorizer' Colorizer and perform the following steps to configure the key-color colorizer:
- Fill the Keys collection.
- Specify the Palette property if you want to use a non-default palette to colorize your data.
The following image demonstrates a bar chart colorized according to the country's region using the key-color colorizer:
Range Colorizer
Select the 'RangeColorizer' Colorizer and follow the steps below to configure the range colorizer.
- Fill the RangeStops collection. These values form ranges that are used to determine which color a series point should have.
- Specify the Palette property if you want to use a non-default palette to colorize your data.
The following image demonstrates a bar chart colorized by the Happy Planet Index using the range colorizer:
Segment Colorizers
Segment Colorizers allow you to paint segments of the Line and Area charts.
You can use the Segment Colorizers with the following series types:
- Line
- Spline
- Step Line
- Scatter Line
- Stacked Line
- Full-Stacked Line
- Area
- Spline Area
- Step Area
- Stacked Area
- Stacked Spline Area
- Stacked Step Area
- Full-Stacked Area
- Full-Stacked Spline Area
- Full-Stacked Step Area
Trend Segment Colorizer
The Trend Segment colorizer changes a line/area's color when a point value increases or decreases. You can specify the colors used to paint increasing and decreasing value segments.
The following table lists properties of this colorizer:
Member | Description |
---|---|
Falling Trend Color | color used to draw the falling value segments. |
Rising Trend Color | color used to draw the rising value segments. |
Falling Trend Legend Text | text the legend uses to identify the falling trend segments. |
Rising Trend LegendText | text the legend uses to identify the rising trend segments. |
Range Segment Colorizer
The Range Segment colorizer allows you to paint line/area segments based on their value range.
The following table lists properties of this colorizer:
Member | Description |
---|---|
Range Stops | Provides access to the collection of double values that define color range boundaries. |
Palette | palette that provides colors for the colorizer. |
Palette Name | a name of the palette that provides colors for the colorizer. |
Legend Item Pattern | pattern to format the text the legend shows for a color range. |
Show In Legend | value whether to show the colorizer items in the legend. |
Point Based Segment Colorizer
The Point Based Segment Colorizer paints line/area segments into the point marker colors. Use a series point colorizer or specify the SeriesPoint.Color property directly to provide markers with colors.
The following table lists properties of this colorizer:
Member | Description |
---|---|
Direction | the direction that is used to distribute the point marker color. |
Color Distribution Direction | Lists values that define the direction used by point markers to distribute a color among segments. |