Table of Contents

Class ChartArea

Namespace
Spire.Xls.Charts
Assembly
Spire.XLS.dll
public class ChartArea : XlsChartFrameFormat, IExcelApplication, IDisposable, IChartFrameFormat, IChartFillBorder
Inheritance
ChartArea
Implements
Inherited Members

Properties

Border

Represents chart border. Read only.

public ChartBorder Border { get; }

Property Value

ChartBorder

Interior

Represents chart interior. Read only. The following code illustrates the use of Interior property:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Create chart and set range
IChart chart = worksheet.Charts.Add();
chart.DataRange = worksheet.Range["B2:C6"];

//Set chart type
chart.ChartType = ExcelChartType.Column3DClustered;

//Gets interior formatting properties for the chart element
IChartInterior chartInterior = chart.ChartArea.Interior;
chartInterior.BackgroundColor = Color.Beige;
chartInterior.Pattern = ExcelPatternType.DarkDownwardDiagonal;

//Save to file
workbook.SaveToFile("Chart.xlsx");
public ChartInterior Interior { get; }

Property Value

ChartInterior