Table of Contents

Class XlsChartFrameFormat

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

Properties

BackGroundColor

public Color BackGroundColor { get; set; }

Property Value

Color

BackGroundColorObject

public OColor BackGroundColorObject { get; }

Property Value

OColor

BackGroundKnownColor

public ExcelColors BackGroundKnownColor { get; set; }

Property Value

ExcelColors

Border

Gets chart border. Read only.

public IChartBorder Border { get; }

Property Value

IChartBorder

Fill

Represents XlsFill gradient format. 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");
public IShapeFill Fill { get; }

Property Value

IShapeFill

ForeGroundColor

public Color ForeGroundColor { get; set; }

Property Value

Color

ForeGroundColorObject

public OColor ForeGroundColorObject { get; }

Property Value

OColor

ForeGroundKnownColor

public ExcelColors ForeGroundKnownColor { get; set; }

Property Value

ExcelColors

Format3D

Gets the chart3 D 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");
public Format3D Format3D { get; }

Property Value

Format3D

The chart3 D properties.

HasFormat3D

public bool HasFormat3D { get; }

Property Value

bool

HasInterior

Indicates whether interior object was created. Read-only.

public bool HasInterior { get; }

Property Value

bool

HasLineProperties

Indicates whether border formatting object was created. Read-only.

public bool HasLineProperties { get; }

Property Value

bool

HasManualLayout

[Obsolete("get and set are not implemented")]
public bool HasManualLayout { get; }

Property Value

bool

HasShadow

public bool HasShadow { get; }

Property Value

bool

Height

Y-size. 1/4000 of chart plot. IsHMode Shall set to True

public int Height { get; set; }

Property Value

int

InnerLayoutTarget

[Obsolete("get and set are not implemented")]
public bool InnerLayoutTarget { get; set; }

Property Value

bool

Interior

Returns object, that represents area properties. Read-only. The following code illustrates the use of Interior property:

//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Column3DClustered;//Gets interior formatting properties for the chart elementIChartInterior chartInterior = chart.ChartArea.Interior;chartInterior.BackgroundColor = Color.Beige;chartInterior.Pattern = ExcelPatternType.DarkDownwardDiagonal;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartInterior Interior { get; }

Property Value

IChartInterior

IsAutoPosition

Calculates position automatically.

public bool IsAutoPosition { get; set; }

Property Value

bool

IsAutoSize

Calculates size automatically.

public bool IsAutoSize { get; set; }

Property Value

bool

IsAutomaticFormat

public bool IsAutomaticFormat { get; set; }

Property Value

bool

IsBorderCornersRound

Gets or sets if border corners is round.

public bool IsBorderCornersRound { get; set; }

Property Value

bool

IsHMode

false value Specifies that the Height shall be interpreted as the Bottom of the chart element..

public bool IsHMode { get; set; }

Property Value

bool

IsWMode

false value Specifies that the Width shall be interpreted as the Right of the chart element..

public bool IsWMode { get; set; }

Property Value

bool

IsXMode

true value Specifies that the X shall be interpreted as the Left of the chart element..

public bool IsXMode { get; set; }

Property Value

bool

IsYMode

true value Specifies that the Y shall be interpreted as the Top of the chart element..

public bool IsYMode { get; set; }

Property Value

bool

LineProperties

Gets chart border. Read-only.

public ChartBorder LineProperties { get; }

Property Value

ChartBorder

Pattern

public ExcelPatternType Pattern { get; set; }

Property Value

ExcelPatternType

RectangleStyle

[Obsolete("get and set are not implemented")]
public RectangleStyleType RectangleStyle { get; set; }

Property Value

RectangleStyleType

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");
public ChartShadow Shadow { get; }

Property Value

ChartShadow

The shadow properties.

Visible

public bool Visible { get; set; }

Property Value

bool

Width

X-size. 1/4000 of chart plot. IsWMode Shall set to True

public int Width { get; set; }

Property Value

int

X

X-position of upper-left corner. 1/4000 of chart plot. IsXMode Shall set to True

public int X { get; set; }

Property Value

int

Y

Y-position of upper-left corner. 1/4000 of chart plot. IsYMode Shall set to True

public int Y { get; set; }

Property Value

int

Methods

Clear()

Clear curent plot area.

[Obsolete("the method is not implemented")]
public void Clear()

Clone(object)

[Obsolete("the method is not implemented")]
public XlsChartFrameFormat Clone(object parent)

Parameters

parent object

Returns

XlsChartFrameFormat

SetDefaultValues(bool, bool)

[Obsolete("the method is not implemented")]
public void SetDefaultValues(bool bAutoSize, bool bIsInteriorGray)

Parameters

bAutoSize bool
bIsInteriorGray bool