Class ExcelChartAxis
An axis for a chart
Inherited Members
Namespace: OfficeOpenXml.Drawing.Chart
Assembly: EPPlus.dll
Syntax
public abstract class ExcelChartAxis : XmlHelper, IDrawingStyle, IDrawingStyleBase, IStyleMandatoryProperties
Fields
_chart
Type of axis
Declaration
protected ExcelChart _chart
Field Value
| Type | Description |
|---|---|
| ExcelChart |
_nsPrefix
Declaration
protected string _nsPrefix
Field Value
| Type | Description |
|---|---|
| System.String |
_title
Chart axis title
Declaration
protected ExcelChartTitle _title
Field Value
| Type | Description |
|---|---|
| ExcelChartTitle |
Properties
AxisPosition
Where the axis is located
Declaration
public abstract eAxisPosition AxisPosition { get; }
Property Value
| Type | Description |
|---|---|
| eAxisPosition |
Border
Access to border properties
Declaration
public ExcelDrawingBorder Border { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingBorder |
CrossBetween
How the axis are crossed
Declaration
public abstract eCrossBetween CrossBetween { get; set; }
Property Value
| Type | Description |
|---|---|
| eCrossBetween |
Crosses
Where the axis crosses
Declaration
public abstract eCrosses Crosses { get; set; }
Property Value
| Type | Description |
|---|---|
| eCrosses |
CrossesAt
The value where the axis cross. Null is automatic
Declaration
public abstract double? CrossesAt { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> |
Deleted
If the axis is deleted
Declaration
public abstract bool Deleted { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
DisplayUnit
The scaling value of the display units for the value axis
Declaration
public abstract double DisplayUnit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Effect
Effects
Declaration
public ExcelDrawingEffectStyle Effect { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingEffectStyle |
Fill
Access to fill properties
Declaration
public ExcelDrawingFill Fill { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingFill |
Font
Access to font properties
Declaration
public ExcelTextFont Font { get; }
Property Value
| Type | Description |
|---|---|
| ExcelTextFont |
Format
The Numberformat used
Declaration
public string Format { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
HasMajorGridlines
True if the axis has major Gridlines
Declaration
public bool HasMajorGridlines { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
HasMinorGridlines
True if the axis has minor Gridlines
Declaration
public bool HasMinorGridlines { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
LabelPosition
The Position of the labels
Declaration
public abstract eTickLabelPosition LabelPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| eTickLabelPosition |
LogBase
The base for a logaritmic scale Null for a normal scale
Declaration
public abstract double? LogBase { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> |
MajorGridlineEffects
Effects for major gridlines for the axis
Declaration
public ExcelDrawingEffectStyle MajorGridlineEffects { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingEffectStyle |
MajorGridlines
Major gridlines for the axis
Declaration
public ExcelDrawingBorder MajorGridlines { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingBorder |
MajorTickMark
Get or Sets the major tick marks for the axis.
Declaration
public abstract eAxisTickMark MajorTickMark { get; set; }
Property Value
| Type | Description |
|---|---|
| eAxisTickMark |
MajorTimeUnit
Major time unit for the axis. Null is automatic
Declaration
public abstract eTimeUnit? MajorTimeUnit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<eTimeUnit> |
MajorUnit
Major unit for the axis. Null is automatic
Declaration
public abstract double? MajorUnit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> |
MaxValue
Max value for the axis. Null is automatic
Declaration
public abstract double? MaxValue { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> |
MinorGridlineEffects
Effects for minor gridlines for the axis
Declaration
public ExcelDrawingEffectStyle MinorGridlineEffects { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingEffectStyle |
MinorGridlines
Minor gridlines for the axis
Declaration
public ExcelDrawingBorder MinorGridlines { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawingBorder |
MinorTickMark
Get or Sets the minor tick marks for the axis.
Declaration
public abstract eAxisTickMark MinorTickMark { get; set; }
Property Value
| Type | Description |
|---|---|
| eAxisTickMark |
MinorTimeUnit
Minor time unit for the axis. Null is automatic
Declaration
public abstract eTimeUnit? MinorTimeUnit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<eTimeUnit> |
MinorUnit
Minor unit for the axis. Null is automatic
Declaration
public abstract double? MinorUnit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> |
MinValue
Minimum value for the axis. Null is automatic
Declaration
public abstract double? MinValue { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Double> |
Orientation
Axis orientation
Declaration
public abstract eAxisOrientation Orientation { get; set; }
Property Value
| Type | Description |
|---|---|
| eAxisOrientation |
SourceLinked
The Numberformats are linked to the source data.
Declaration
public bool SourceLinked { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TextBody
Access to text body properties
Declaration
public ExcelTextBody TextBody { get; }
Property Value
| Type | Description |
|---|---|
| ExcelTextBody |
ThreeD
3D properties
Declaration
public ExcelDrawing3D ThreeD { get; }
Property Value
| Type | Description |
|---|---|
| ExcelDrawing3D |
TickLabelPosition
Position of the Lables
Declaration
public abstract eTickLabelPosition TickLabelPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| eTickLabelPosition |
Title
Declaration
public virtual ExcelChartTitle Title { get; }
Property Value
| Type | Description |
|---|---|
| ExcelChartTitle |
Methods
AddGridlines(Boolean, Boolean)
Adds gridlines and styles them according to the style selected in the StyleManager
Declaration
public void AddGridlines(bool addMajor = true, bool addMinor = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | addMajor | Indicates if the Major gridlines should be added |
| System.Boolean | addMinor | Indicates if the Minor gridlines should be added |
AddTitle(String)
Adds the axis title and styles it according to the style selected in the StyleManager
Declaration
public void AddTitle(string title)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | title |
AddTitleNode()
Declaration
protected XmlNode AddTitleNode()
Returns
| Type | Description |
|---|---|
| System.Xml.XmlNode |
GetTitle()
Declaration
protected abstract ExcelChartTitle GetTitle()
Returns
| Type | Description |
|---|---|
| ExcelChartTitle |
RemoveGridlines()
Removes Major and Minor gridlines from the Axis
Declaration
public void RemoveGridlines()
RemoveGridlines(Boolean, Boolean)
Removes gridlines from the Axis
Declaration
public void RemoveGridlines(bool removeMajor, bool removeMinor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | removeMajor | Indicates if the Major gridlines should be removed |
| System.Boolean | removeMinor | Indicates if the Minor gridlines should be removed |
RemoveTitle()
Removes the axis title
Declaration
public void RemoveTitle()