Skip to main content
A newer version of this page is available. .

Palette Class

Represents a palette (collection of colors) used to draw a chart.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.2.dll

Declaration

public abstract class Palette :
    PaletteBase

Remarks

A Palette object is returned by the ChartControlBase.Palette property, which defines colors for series points. It can be set either to one of the standard palettes, or to a CustomPalette object. A custom palette’s colors are stored in the ColorCollection, which is available via the CustomPalette.Colors property.

For more information, see Chart Themes and Palettes.

Example

This example demonstrates how to change the series point colors by using a custom palette. To do this, a CustomPalette is added to the chart’s ChartControlBase.Palette. And, custom colors are specified via the CustomPalette.Colors property.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/how-to-change-point-colors-e388.

<dxc:ChartControl.Palette>
    <dxc:CustomPalette>
        <dxc:CustomPalette.Colors>
            <Color>Blue</Color>
            <Color>Yellow</Color>
            <Color>Magenta</Color>
        </dxc:CustomPalette.Colors>
    </dxc:CustomPalette>
</dxc:ChartControl.Palette>

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

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.

See Also