Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Move a Chart to a Chart Sheet

The following example demonstrates how to move an existing chart from a worksheet to a separate chart sheet. To do this, call the ChartObject.MoveToNewChartSheet method for a chart you wish to move.

To transfer a chart back to the worksheet containing the source data, use the ChartObject.MoveToWorksheet method.

// Create an embedded chart on the worksheet.
Chart chart = worksheet.Charts.Add(ChartType.Pie, worksheet["B2:C7"]);
chart.TopLeftCell = worksheet.Cells["E2"];
chart.BottomRightCell = worksheet.Cells["K15"];

// Move the chart to a chart sheet.
ChartSheet chartSheet = chart.MoveToNewChartSheet("Chart");

SpreadsheetAPI_MoveToChartSheet