Table of Contents

Class XlsChartFormat

Namespace
Spire.Xls.Core.Spreadsheet.Charts
Assembly
Spire.XLS.dll
public class XlsChartFormat : XlsObject, IExcelApplication, IDisposable, IChartFormat, ICloneParent
Inheritance
XlsChartFormat
Implements
Derived
Inherited Members

Properties

AutoScaling

True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart..

public bool AutoScaling { get; set; }

Property Value

bool

BubbleScale

Percent of largest bubble compared to chart in general. ( 0 - 300 ). The following code illustrates how to set BubbleScale for ExcelChartType.Bubble3D chart:

//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add(ExcelChartType.Bubble3D);chart.DataRange = worksheet.Range["A1:C2"];chart.Series[0].Bubbles = worksheet.Range["A2:C3"];//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set bubble scaleformat.BubbleScale = 50;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int BubbleScale { get; set; }

Property Value

int

DataFormatOrNull

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

Property Value

XlsChartSerieDataFormat

Delimiter

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

Property Value

string

DelimiterLength

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

Property Value

int

DepthPercent

Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).

public int DepthPercent { get; set; }

Property Value

int

DoughnutHoleSize

Size of center hole in a doughnut chart (as a percentage).( 10 - 90 ). The following code illustrates how to set DoughnutHoleSize for ExcelChartType.Doughnut chart:

//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["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Doughnut;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set Doughnut hole sizeformat.DoughnutHoleSize = 60;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int DoughnutHoleSize { get; set; }

Property Value

int

DrawingZOrder

Drawing order (0 = bottom of the z-order).

public int DrawingZOrder { get; set; }

Property Value

int

Elevation

Gets or sets the elevation of the 3-D chart view, in degrees (0 to +90 degrees).

public int Elevation { get; set; }

Property Value

int

FirstDropBar

Returns object that represents first drop bar. The following code illustrates how to access FirstDropBar:

//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["A1:C3"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set chart drop barIChartDropBar dropBar = chart.Series[0].Format.Options.FirstDropBar;
public IChartDropBar FirstDropBar { get; }

Property Value

IChartDropBar

FirstSliceAngle

Angle of the first pie slice expressed in degrees. ( 0 - 360 ). The following code illustrates how to set FirstSliceAngle for ExcelChartType.Pie chart:

//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["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Pie;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set Gap widthformat.FirstSliceAngle = 60;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int FirstSliceAngle { get; set; }

Property Value

int

Gap

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

Property Value

int

GapDepth

Returns or sets the distance between the data series in a 3-D chart, as a percentage of the marker width.( 0 - 500 )

public int GapDepth { get; set; }

Property Value

int

GapWidth

Space between categories (percent of bar width), default = 50. The following code illustrates how to set GapWidth for ExcelChartType.Column3DStacked chart:

//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["A1:C3"];//Set chart typechart.ChartType = ExcelChartType.Column3DStacked;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set Gap widthformat.GapWidth = 400;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int GapWidth { get; set; }

Property Value

int

HasRadarAxisLabels

True if a radar chart has axis labels. Applies only to radar charts. The following code illustrates how to hide the axis labels of radar charts:

//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["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Radar;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set radar label visibilityformat.HasRadarAxisLabels = false;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool HasRadarAxisLabels { get; set; }

Property Value

bool

HasShadowBar

public bool HasShadowBar { get; set; }

Property Value

bool

HasShadowBoppop

public bool HasShadowBoppop { get; set; }

Property Value

bool

HasShadowLine

True if this line has a shadow.

public bool HasShadowLine { get; set; }

Property Value

bool

HasShadowPie

True if this pie has a shadow.

public bool HasShadowPie { get; set; }

Property Value

bool

HasShadowRadar

True if this radar series has a shadow.

public bool HasShadowRadar { get; set; }

Property Value

bool

HasShadowScatter

True if bubble series has a shadow.

public bool HasShadowScatter { get; set; }

Property Value

bool

HasValue

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

Property Value

bool

HasWedgeCallout

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

Property Value

bool

HeightPercent

Returns or sets the height of a 3-D chart as a percentage of the chart width

public int HeightPercent { get; set; }

Property Value

int

Is3D

If true - serie 3D; otherwise serie 2D. Read-only.

public bool Is3D { get; }

Property Value

bool

Is3DPhongShade

True if this surface chart has shading.

public bool Is3DPhongShade { get; set; }

Property Value

bool

IsAreaShadowed

This area has a shadow.

public bool IsAreaShadowed { get; set; }

Property Value

bool

IsBubbleSize

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

Property Value

bool

IsBubbles

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

Property Value

bool

IsCategoryBrokenDown

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

Property Value

bool

IsCategoryName

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

Property Value

bool

IsChartChartLine

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

Property Value

bool

IsChartLineFormat

If true - format contains series line. Read-only.

public bool IsChartLineFormat { get; }

Property Value

bool

IsClustered

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

Property Value

bool

IsDefaultElevation

Indicates whether elevation has default value.

public bool IsDefaultElevation { get; }

Property Value

bool

IsDefaultRotation

Indicates whether rotation has default value.

public bool IsDefaultRotation { get; }

Property Value

bool

IsDropBar

If true - format contains drop bar record. Read-only.

public bool IsDropBar { get; }

Property Value

bool

IsFillSurface

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

Property Value

bool

IsHorizontalBar

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

Property Value

bool

IsLine

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

Property Value

bool

IsMarker

If true - format has marker; otherwise false. Read-only.

public bool IsMarker { get; }

Property Value

bool

IsPercentage

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

Property Value

bool

IsPrimaryAxis

public bool IsPrimaryAxis { get; }

Property Value

bool

IsSeriesName

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

Property Value

bool

IsShowLeaderLines

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

Property Value

bool

IsSmoothed

If true - format has smothed line; otherwise false. Read-only.

public bool IsSmoothed { get; }

Property Value

bool

IsStacked

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

Property Value

bool

IsVaryColor

Vary color for each data point. The following code illustrates how to set IsVaryColor for charts:

//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["A1:C2"];//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set vary colorformat.IsVaryColor = true;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsVaryColor { get; set; }

Property Value

bool

IsVeryColor

public bool IsVeryColor { get; set; }

Property Value

bool

LineStyle

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

Property Value

DropLineStyleType

NumSplitValue

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

Property Value

int

Overlap

Space between bars ( -100 : 100 ). The following code illustrates how to set Overlap for charts:

//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["A1:C3"];//Set chart typechart.ChartType = ExcelChartType.ColumnStacked;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set overlapformat.Overlap = 20;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int Overlap { get; set; }

Property Value

int

Perspective

Returns or sets the perspective for the 3-D chart view.( 0 - 100 )

public int Perspective { get; set; }

Property Value

int

PieChartType

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

Property Value

ChartPieType

PieSecondSize

Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. ( 5 - 200 ). The following code illustrates how to set PieSecondSize for charts:

//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["A1:F2"];//Set chart typechart.ChartType = ExcelChartType.PieOfPie;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set second pie sizeformat.PieSecondSize = 40;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int PieSecondSize { get; set; }

Property Value

int

PieSeriesLine

Represents series line properties. ( For pie of pie or pie of bar chart types only. ) Read only. The following code illusrates how to set color to IChartBorder.Color property for ExcelChartType.PieOfPie chart using PieSeriesLine 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["A1:F2"];//Set chart typechart.ChartType = ExcelChartType.PieOfPie;//Set pie series line borderIChartBorder border =  chart.Series[0].Format.Options.PieSeriesLine;//Set colorborder.Color = Color.Red;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartBorder PieSeriesLine { get; }

Property Value

IChartBorder

RightAngleAxes

True if the chart axes are at right angles, independent of chart rotation or elevation.

public bool RightAngleAxes { get; set; }

Property Value

bool

Rotation

Returns or sets the rotation of the 3-D chart view (the rotation of the plot area around the z-axis, in degrees).(0 to 360 degrees).

public int Rotation { get; set; }

Property Value

int

SecondDropBar

Returns object that represents second drop bar. The following code illustrates how to access SecondDropBar:

//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["A1:C3"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set chart first drop barIChartDropBar dropBar = chart.Series[0].Format.Options.FirstDropBar;//Set chart second drop bardropBar = chart.Series[0].Format.Options.SecondDropBar;
public IChartDropBar SecondDropBar { get; }

Property Value

IChartDropBar

ShowAsPercentsBar

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

Property Value

bool

ShowAsPercentsLine

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

Property Value

bool

ShowNegativeBubbles

True to show negative bubbles. The following code illustrates how to load negative values to ExcelChartType.Bubble3D chart value axis and set ShowNegativeBubbles to "true":

//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add(ExcelChartType.Bubble3D);chart.DataRange = worksheet.Range["A1:D2"];chart.Series[0].Bubbles = worksheet.Range["A2:C3"];//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set negative bubble visibilityformat.ShowNegativeBubbles = true;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool ShowNegativeBubbles { get; set; }

Property Value

bool

SizeRepresents

Returns or sets what the bubble size represents on a bubble chart. The following code illustrates how to set BubbleSizeType.Width to SizeRepresents property:

//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add(ExcelChartType.Bubble3D);chart.DataRange = worksheet.Range["A1:C2"];chart.Series[0].Bubbles = worksheet.Range["A2:C3"];//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set bubble scale and size representsformat.BubbleScale = 50;format.SizeRepresents = BubbleSizeType.Width;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public BubbleSizeType SizeRepresents { get; set; }

Property Value

BubbleSizeType

SplitPercent

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

Property Value

int

SplitType

Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. The following code illustrates how to set SplitType.Value to SplitType:

//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["A1:F2"];//Set chart typechart.ChartType = ExcelChartType.PieOfPie;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set split typeformat.SplitType = SplitType.Value;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public SplitType SplitType { get; set; }

Property Value

SplitType

SplitValue

Returns or sets the threshold value separating the two sections of either a pie of pie chart or a bar of pie chart. The following code illustrates how to set SplitValue for charts:

//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["A1:F2"];//Set chart typechart.ChartType = ExcelChartType.PieOfPie;//Set chart formatIChartFormat format = chart.Series[0].Format.Options;//Set split valueformat.SplitValue = 20;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int SplitValue { get; set; }

Property Value

int

StackValuesBar

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

Property Value

bool

StackValuesLine

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

Property Value

bool

UseDefaultSplitValue

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

Property Value

bool

WallsAndGridlines2D

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

Property Value

bool

Methods

Clone(object)

public object Clone(object parent)

Parameters

parent object

Returns

object