Skip to main content
All docs
V24.1

ChartObject.ColorPalette Property

Returns or specifies a color palette for the chart. Applies only to Excel 2016 charts.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

ChartColorPalette ColorPalette { get; set; }

Property Value

Type Description
ChartColorPalette

An enumeration member that specifies the chart’s color palette.

Available values:

Show 17 items
Name Description Example (Office Theme)
Colorful1

Tints and shades of the Accent 1 through Accent 6 theme colors.

Spreadsheet Colorful Palette 1

Colorful2

Tints and shades of the Accent 1, Accent 3, and Accent 5 theme colors.

Spreadsheet Colorful Palette 2

Colorful3

Tints and shades of the Accent 2, Accent 4, and Accent 6 theme colors.

Spreadsheet Colorful Palette 3

Colorful4

Tints and shades of the Accent 6, Accent 5, and Accent 4 theme colors.

Spreadsheet Colorful Palette 4

Monochromatic1

A gradient of the Accent 1 theme color (dark to light).

Spreadsheet Monochromatic Palette 1

Monochromatic2

A gradient of the Accent 2 theme color (dark to light).

Spreadsheet Monochromatic Palette 2

Monochromatic3

A gradient of the Accent 3 theme color (dark to light).

Spreadsheet Monochromatic Palette 3

Monochromatic4

A gradient of the Accent 4 theme color (dark to light).

Spreadsheet Monochromatic Palette 4

Monochromatic5

A gradient of the Accent 5 theme color (dark to light).

Spreadsheet Monochromatic Palette 5

Monochromatic6

A gradient of the Accent 6 theme color (dark to light).

Spreadsheet Monochromatic Palette 6

Monochromatic7

Tints of the Dark 1 theme color.

Spreadsheet Monochromatic Palette 7

Monochromatic8

A gradient of the Accent 1 theme color (light to dark).

Spreadsheet Monochromatic Palette 8

Monochromatic9

A gradient of the Accent 2 theme color (light to dark).

Spreadsheet Monochromatic Palette 9

Monochromatic10

A gradient of the Accent 3 theme color (light to dark).

Spreadsheet Monochromatic Palette 10

Monochromatic11

A gradient of the Accent 4 theme color (light to dark).

Spreadsheet Monochromatic Palette 11

Monochromatic12

A gradient of the Accent 5 theme color (light to dark).

Spreadsheet Monochromatic Palette 12

Monochromatic13

A gradient of the Accent 6 theme color (light to dark).

Spreadsheet Monochromatic Palette 13

Remarks

Use the ColorPalette property to change chart colors. These colors depend on the document theme and change when another theme is applied to the workbook. The ChartObject.Style property defines the chart style (a combination of format options and layout settings).

The example below demonstrates how to create a waterfall chart and specify its colors and style.

Change the chart style and color palette for a waterfall chart

// Create a waterfall chart and specify its location.
Chart chart = worksheet.Charts.Add(ChartType.Waterfall, worksheet["B2:C7"]);
chart.TopLeftCell = worksheet.Cells["E2"];
chart.BottomRightCell = worksheet.Cells["L17"];

// Hide the major gridlines for the value axis.
chart.PrimaryAxes[1].MajorGridlines.Visible = false;

// Specify series options.
var options = chart.Series[0].LayoutOptions.Waterfall;
// Display connector lines.
options.ShowConnectorLines = true;
// Set the third data point as the total.
options.SubtotalDataPoints.Add(2);
// Set the last data point as the total.
options.SubtotalDataPoints.Add(5);

// Specify the chart style.
chart.Style = ChartStyle.Style3;
// Change chart colors.
chart.ColorPalette = ChartColorPalette.Colorful4;

// Add the chart title.
chart.Title.Visible = true;
chart.Title.SetValue("Income Statement");
See Also