Interface IChartFillBorder
Provides formatting options for area elements in the chart.
public interface IChartFillBorder
Properties
Fill
Represents XlsFill options. Read-only.
//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
Format3D
Gets the chart3 D properties.
//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].
//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.
//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
HasLineProperties
This property indicates whether line formatting object was created. Read-only.
//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
HasShadow
Gets a value indicating whether this instance has shadow properties.
//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.
//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
LineProperties
Returns object, that represents line properties. Read-only.
//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
Shadow
Gets the shadow properties.
//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.