Table of Contents

Class ExcelChart

Namespace
OfficeOpenXml.Drawing.Chart
Assembly
EPPlus.dll

Base class for Chart object.

public abstract class ExcelChart : ExcelDrawing, IDisposable
Inheritance
ExcelChart
Implements
Derived
Inherited Members

Fields

_chartNode

The chart element

protected XmlNode _chartNode

Field Value

XmlNode

_chartXmlHelper

The Xml helper for the chart xml

protected XmlHelper _chartXmlHelper

Field Value

XmlHelper

Properties

Axis

An array containg all axis of all Charttypes

public virtual ExcelChartAxis[] Axis { get; }

Property Value

ExcelChartAxis[]

BackWall

Formatting for the backwall of a 3D chart.

note

This property is null for non 3D charts

public ExcelChartSurface BackWall { get; protected set; }

Property Value

ExcelChartSurface

Border

Border

public abstract ExcelDrawingBorder Border { get; }

Property Value

ExcelDrawingBorder

ChartType

Type of chart

public eChartType ChartType { get; }

Property Value

eChartType

ChartXml

The chart xml document

public XmlDocument ChartXml { get; }

Property Value

XmlDocument

DisplayBlanksAs

Specifies the possible ways to display blanks

public abstract eDisplayBlanksAs DisplayBlanksAs { get; set; }

Property Value

eDisplayBlanksAs

DrawingType

The type of drawing

public override eDrawingType DrawingType { get; }

Property Value

eDrawingType

Effect

Effects

public abstract ExcelDrawingEffectStyle Effect { get; }

Property Value

ExcelDrawingEffectStyle

Fill

Access to Fill properties

public abstract ExcelDrawingFill Fill { get; }

Property Value

ExcelDrawingFill

Floor

Formatting for the floor of a 3D chart.

note

This property is null for non 3D charts

public ExcelChartSurface Floor { get; protected set; }

Property Value

ExcelChartSurface

Font

Access to font properties

public abstract ExcelTextFont Font { get; }

Property Value

ExcelTextFont

HasLegend

If the chart has a legend

public abstract bool HasLegend { get; }

Property Value

bool

HasTitle

True if the chart has a title

public abstract bool HasTitle { get; }

Property Value

bool

Legend

Legend

public virtual ExcelChartLegend Legend { get; }

Property Value

ExcelChartLegend

PivotTableSource

If the chart is a pivochart this is the pivotable used as source.

public ExcelPivotTable PivotTableSource { get; protected set; }

Property Value

ExcelPivotTable

PlotArea

Plotarea

public abstract ExcelChartPlotArea PlotArea { get; }

Property Value

ExcelChartPlotArea

RoundedCorners

Border rounded corners

public abstract bool RoundedCorners { get; set; }

Property Value

bool

Series

Chart series

public virtual ExcelChartSeries<ExcelChartSerie> Series { get; }

Property Value

ExcelChartSeries<ExcelChartSerie>

ShowDataLabelsOverMaximum

Specifies data labels over the maximum of the chart shall be shown

public abstract bool ShowDataLabelsOverMaximum { get; set; }

Property Value

bool

ShowHiddenData

Show data in hidden rows and columns

public abstract bool ShowHiddenData { get; set; }

Property Value

bool

SideWall

Formatting for the sidewall of a 3D chart.

note

This property is null for non 3D charts

public ExcelChartSurface SideWall { get; protected set; }

Property Value

ExcelChartSurface

Style

The build-in chart styles. Use StyleManager for the more modern styling.

public abstract eChartStyle Style { get; set; }

Property Value

eChartStyle

StyleManager

Manage style settings for the chart

public ExcelChartStyleManager StyleManager { get; }

Property Value

ExcelChartStyleManager

TextBody

Access to text body properties

public abstract ExcelTextBody TextBody { get; }

Property Value

ExcelTextBody

ThreeD

3D properties

public abstract ExcelDrawing3D ThreeD { get; }

Property Value

ExcelDrawing3D

Title

The titel of the chart

public virtual ExcelChartTitle Title { get; }

Property Value

ExcelChartTitle

UseSecondaryAxis

If true the charttype will use the secondary axis. The chart must contain a least one other charttype that uses the primary axis.

public bool UseSecondaryAxis { get; set; }

Property Value

bool

VaryColors

If the chart has only one serie this varies the colors for each point. This property does not apply to extention charts.

public abstract bool VaryColors { get; set; }

Property Value

bool

View3D

3D-settings

public abstract ExcelView3D View3D { get; }

Property Value

ExcelView3D

WorkSheet

Reference to the worksheet

public ExcelWorksheet WorkSheet { get; }

Property Value

ExcelWorksheet

XAxis

The X Axis

public virtual ExcelChartAxis XAxis { get; protected set; }

Property Value

ExcelChartAxis

YAxis

The Y Axis

public virtual ExcelChartAxis YAxis { get; protected set; }

Property Value

ExcelChartAxis

Methods

DeleteTitle()

Remove the title from the chart

public abstract void DeleteTitle()

HasThirdAxis()

Returns true if the chart is a sureface chart

protected bool HasThirdAxis()

Returns

bool

True if the chart is a sureface chart

IsType3D()

Returns true if the chart is a 3D chart

protected bool IsType3D()

Returns

bool

True if the chart is a 3D chart

IsTypeArea()

Returns true if the chart is a scatter chart

protected bool IsTypeArea()

Returns

bool

True if the chart is a scatter chart

IsTypeBubble()

Returns true if the chart is a bubble chart

protected bool IsTypeBubble()

Returns

bool

True if the chart is a bubble chart

IsTypeClustered()

Returns true if the chart is of type clustered

protected bool IsTypeClustered()

Returns

bool

True if the chart is of type clustered

IsTypeDoughnut()

Returns true if the chart is a Doughnut chart

protected bool IsTypeDoughnut()

Returns

bool

True if the chart is a Doughnut chart

IsTypeLine()

Returns true if the chart is a line chart

protected bool IsTypeLine()

Returns

bool

True if the chart is a line chart

IsTypePercentStacked()

Returns true if the chart is of type stacked percentage

protected bool IsTypePercentStacked()

Returns

bool

True if the chart is of type stacked percentage

IsTypePie()

Returns true if the chart is a pie chart

protected bool IsTypePie()

Returns

bool

true if the chart is a pie chart

IsTypePieDoughnut()

Returns true if the chart is a pie or Doughnut chart

protected bool IsTypePieDoughnut()

Returns

bool

True if the chart is a pie or Doughnut chart

IsTypeRadar()

Returns true if the chart is a radar chart

protected bool IsTypeRadar()

Returns

bool

True if the chart is a radar chart

IsTypeScatter()

Returns true if the chart is a scatter chart

protected bool IsTypeScatter()

Returns

bool

True if the chart is a scatter chart

IsTypeShape()

Returns true if the chart has shapes, like bars and columns

protected bool IsTypeShape()

Returns

bool

True if the chart has shapes

IsTypeStacked()

Returns true if the chart is of type stacked

protected bool IsTypeStacked()

Returns

bool

True if the chart is of type stacked

IsTypeStock()

Return true if the chart is a stock chart.

protected bool IsTypeStock()

Returns

bool

true if the chart is a stock chart.

IsTypeSurface()

Returns true if the chart is a sureface chart

protected bool IsTypeSurface()

Returns

bool

True if the chart is a sureface chart