Click or drag to resize

IChartFrameFormat Properties

The IChartFrameFormat type exposes the following members.

Properties
Name Description
Public property Code example Border
Represents chart border. Read only.
Examples
The following code illustrates use of Border property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//border of the chart element</para><para>chart.ChartTitleArea.Text = "Sample Chart";</para><para>chart.ChartTitleArea.FrameFormat.Border.Color = Color.Red;</para><para>chart.ChartTitleArea.FrameFormat.Border.Pattern = ChartLinePatternType.DashDotDot;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property Code example Fill
Represents XlsFill options. Read-only.
Examples
The following code illustrates the use of Fill property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Gets fill options for the chart element</para><para>IShapeFill fillChart = chart.ChartArea.Fill;</para><para>fillChart.FillType = ShapeFillType.Gradient;</para><para>fillChart.BackColor = Color.FromArgb(205, 217, 234);</para><para>fillChart.ForeColor = Color.White;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example Format3D
Gets the chart3 D properties.
Examples
The following code illustrates the use of Format3D property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Gets 3D-effect properties for the chart element</para><para>Format3D threeDFromat = chart.ChartArea.Format3D;</para><para>threeDFromat.BevelTopType = XLSXChartBevelType.Slope;</para><para>threeDFromat.BevelTopHeight = 16;</para><para>threeDFromat.BevelTopWidth = 7;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example HasFormat3D
Gets a value indicating whether [has3d properties].
Examples
The following code illustrates the use of HasFormat3D property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Create a fill border and set 3D formatting value</para><para>IChartFillBorder fillBorder = chart.ChartArea;</para><para>chart.ChartArea.Format3D.BevelTopType = XLSXChartBevelType.Slope;</para><para>//True if the chart element has 3D formatting</para><para>if (fillBorder.HasFormat3D){//Your Code Here}</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example HasInterior
This property indicates whether interior object was created. Read-only.
Examples
The following code illustrates the use of HasInterior property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Create a fill border and set interior value</para><para>IChartFillBorder fillBorder = chart.ChartArea;</para><para>chart.ChartArea.Interior.ForegroundColor = Color.Yellow;</para><para>//True if the chart element has interior formatting</para><para>if (fillBorder.HasInterior){//Your Code Here}</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example HasLineProperties
This property indicates whether line formatting object was created. Read-only.
Examples
The following code illustrates the use of HasLineProperties property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Create a fill border and set line border value</para><para>IChartFillBorder fillBorder = chart.ChartArea;</para><para>chart.ChartArea.Border.Color = Color.Yellow;</para><para>//True if the chart element has line formatting</para><para>if (fillBorder.HasLineProperties){//Your Code Here}</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example HasShadow
Gets a value indicating whether this instance has shadow properties.
Examples
The following code illustrates the use of HasShadowProperties property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Create a fill border and set line border value</para><para>IChartFillBorder fillBorder = chart.ChartArea;</para><para>chart.ChartArea.Shadow.ShadowOuterType = XLSXChartShadowOuterType.OffsetBottom;</para><para>//True if the chart element has 3D formatting</para><para>if (fillBorder.HasShadow){//Your Code Here}</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example Interior
Returns object, that represents area properties. Read-only.
Examples
The following code illustrates the use of Interior property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Gets interior formatting properties for the chart element</para><para>IChartInterior chartInterior = chart.ChartArea.Interior;</para><para>chartInterior.BackgroundColor = Color.Beige;</para><para>chartInterior.Pattern = ExcelPatternType.DarkDownwardDiagonal;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example IsBorderCornersRound
Gets or sets flag if border corners is round.
Examples
The following code illustrates use of IsBorderCornersRound property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//True if the chart area has rounded corners</para><para>IChartFrameFormat chartArea = chart.ChartArea;</para><para>chartArea.IsBorderCornersRound = true;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property Code example LineProperties
Returns object, that represents line properties. Read-only.
Examples
The following code illustrates the use of LineProperties:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Gets line formatting properties for the chart element</para><para>IChartBorder border = chart.PlotArea.Border;</para><para>border.Pattern = ChartLinePatternType.DashDotDot;</para><para>border.Color = Color.Orange;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Public property Code example Shadow
Gets the shadow properties.
Examples
The following code illustrates the use of Shadow property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>//Gets shadow formatting properties for the chart element</para><para>ChartShadow shadowChart = chart.ChartArea.Shadow;</para><para>shadowChart.ShadowPrespectiveType = XLSXChartPrespectiveType.Below;</para><para>shadowChart.Color = Color.Aqua;</para><para>shadowChart.Blur = 22;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
(Inherited from IChartFillBorder .)
Top
See Also