Table of Contents

Interface IChartFrameFormat

Namespace
Spire.Xls.Core
Assembly
Spire.XLS.dll

Represent the borders and layout options of the chart elements.

public interface IChartFrameFormat : IChartFillBorder
Inherited Members

Properties

Border

Represents chart border. Read only. The following code illustrates use of Border 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.Cone3DClustered;

//border of the chart element
chart.ChartTitleArea.Text = "Sample Chart";
chart.ChartTitleArea.FrameFormat.Border.Color = Color.Red;
chart.ChartTitleArea.FrameFormat.Border.Pattern = ChartLinePatternType.DashDotDot;

//Save to file
workbook.SaveToFile("Chart.xlsx");
IChartBorder Border { get; }

Property Value

IChartBorder

IsBorderCornersRound

Gets or sets flag if border corners is round. The following code illustrates use of IsBorderCornersRound 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.Cone3DClustered;

//True if the chart area has rounded corners
IChartFrameFormat chartArea = chart.ChartArea;
chartArea.IsBorderCornersRound = true;

//Save to file
workbook.SaveToFile("Chart.xlsx");
bool IsBorderCornersRound { get; set; }

Property Value

bool

Methods

Clear()

Clear curent plot area.

void Clear()