All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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.v20.2.Core.dll

Declaration

ChartColorPalette ColorPalette { get; set; }
Property ColorPalette As ChartColorPalette

Property Value

Type Description
ChartColorPalette

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

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