Skip to content
.NET, WinForms, XtraCharts Suite
C#
Branch: 19.1.3+
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CS
VB
.gitattributes
.gitignore
LICENSE
Readme.md
config.json

Readme.md

Files to look at:

How to colorize charts using the Range Colorizer

This example demonstrates how to color each series point in a specific color depending on the Happy Planet Index (HPI) data obtained from a datasource.

Description

To accomplish this task, create a range colorizer and assign it to the SeriesViewBase.Colorizer property.

To access HPI information from the HPI.xml datasource, set the SeriesBase.ColorDataMember property to the "HPI" data field.
Then, add range stops (data splits in ranges) for the colorizer to the DoubleCollection object. This object is accessed using the RangeColorizer.RangeStops ptoperty.

 

After that, specify the desired palette entries in the PaletteEntry objects using their Color and Color2 properties and add PaletteEntry objects to the chart palette repository using the ChartControl.PaletteRepository property. Then, it is necessary to choose a palette for painting series points via the RangeColorizer.PaletteName property.

The colorizer automatically associates each color with the specified data range to colorize series.

To see information on what each color means in the legend, specify {V1} and {V2} patterns using the RangeColorizer.LegendItemPattern property.


You can’t perform that action at this time.