Table of Contents

Interface IChartFillBorder

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

Provides formatting options for area elements in the chart.

public interface IChartFillBorder

Properties

Fill

Represents XlsFill options. Read-only. The following code illustrates the use of Fill 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 fill options for the chart element
IShapeFill fillChart = chart.ChartArea.Fill;
fillChart.FillType = ShapeFillType.Gradient;
fillChart.BackColor = Color.FromArgb(205, 217, 234);
fillChart.ForeColor = Color.White;

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

Property Value

IShapeFill

Format3D

Gets the chart3 D properties. The following code illustrates the use of Format3D 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 3D-effect properties for the chart element
Format3D threeDFromat = chart.ChartArea.Format3D;
threeDFromat.BevelTopType = XLSXChartBevelType.Slope;
threeDFromat.BevelTopHeight = 16;
threeDFromat.BevelTopWidth = 7;

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

Property Value

Format3D

The chart3 D properties.

HasFormat3D

Gets a value indicating whether [has3d properties]. The following code illustrates the use of HasFormat3D 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;

//Create a fill border and set 3D formatting value
IChartFillBorder fillBorder = chart.ChartArea;
chart.ChartArea.Format3D.BevelTopType = XLSXChartBevelType.Slope;

//True if the chart element has 3D formatting
if (fillBorder.HasFormat3D){//Your Code Here}

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

Property Value

bool

true if [has3d properties]; otherwise, false.

HasInterior

This property indicates whether interior object was created. Read-only. The following code illustrates the use of HasInterior 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;

//Create a fill border and set interior value
IChartFillBorder fillBorder = chart.ChartArea;
chart.ChartArea.Interior.ForegroundColor = Color.Yellow;

//True if the chart element has interior formatting
if (fillBorder.HasInterior){//Your Code Here}

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

Property Value

bool

HasLineProperties

This property indicates whether line formatting object was created. Read-only. The following code illustrates the use of HasLineProperties 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;

//Create a fill border and set line border value
IChartFillBorder fillBorder = chart.ChartArea;
chart.ChartArea.Border.Color = Color.Yellow;

//True if the chart element has line formatting
if (fillBorder.HasLineProperties){//Your Code Here}

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

Property Value

bool

HasShadow

Gets a value indicating whether this instance has shadow properties. The following code illustrates the use of HasShadowProperties 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;

//Create a fill border and set line border value
IChartFillBorder fillBorder = chart.ChartArea;
chart.ChartArea.Shadow.ShadowOuterType = XLSXChartShadowOuterType.OffsetBottom;

//True if the chart element has 3D formatting
if (fillBorder.HasShadow){//Your Code Here}

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

Property Value

bool

true if this instance has shadow properties; otherwise, false.

Interior

Returns object, that represents area properties. 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");
IChartInterior Interior { get; }

Property Value

IChartInterior

LineProperties

Returns object, that represents line properties. Read-only. The following code illustrates the use of LineProperties:

//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 line formatting properties for the chart element
IChartBorder border = chart.PlotArea.Border;
border.Pattern = ChartLinePatternType.DashDotDot;
border.Color = Color.Orange;

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

Property Value

ChartBorder

Shadow

Gets the shadow properties. The following code illustrates the use of Shadow 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 shadow formatting properties for the chart element
ChartShadow shadowChart = chart.ChartArea.Shadow;
shadowChart.ShadowPrespectiveType = XLSXChartPrespectiveType.Below;
shadowChart.Color = Color.Aqua;
shadowChart.Blur = 22;

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

Property Value

ChartShadow

The shadow properties.