ChartAxis Class
Represents a base class for all chart axis types.
- Inheritance:
- System.
Object ChartAxis
- Derived
Properties
AxisType
Property Value
CrossesAt
Gets or sets the specific value or category on which the opposite axis should be positioned. To be used with Cross
Property Value
- System.
Nullable <System.Double >
CrossType
Gets or sets the axis cross configuration.
Property Value
The configuration of how this axis should cross the opposite axis.
Remarks
Fill
Gets or sets the fill formatting options.
Property Value
The fill formatting options.
IsVisible
Gets or sets a value indicating whether axis is visible.
Property Value
- System.
Boolean
true if axis is visible; otherwise, false.
Remarks
Default value of this property is true.
LabelsPosition
Gets or sets the axis labels position.
Property Value
The axis labels position.
MajorGridlines
Gets the major gridlines.
Property Value
The major gridlines.
MajorTickMarkType
Gets or sets the major tick marks position.
Property Value
The major tick marks position.
MinorGridlines
Gets the minor gridlines.
Property Value
The minor gridlines.
MinorTickMarkType
Gets or sets the minor tick marks position.
Property Value
The minor tick marks position.
NumberFormat
Gets or sets the number format used for formatting axis value labels. If Number
Property Value
- System.
String
The number format used for formatting axis value labels.
Remarks
If Number
- If axis is Category
Axis or DateAxis , then NumberFormat of the first cell in CategoryLabels will be used.Reference - If axis is Value
Axis , then NumberFormat of the first cell in ValuesReference of the chart's first series will be used.
Otherwise, if Number
Otherwise, if number format cannot be retrieved by any previously described means, then "General" number format will be used to format axis value labels.
NumberFormatLinkedToSource
Gets or sets a value indicating whether number format from chart's source data (cells) will be used to format axis value labels.
Property Value
- System.
Boolean
true if number format from chart's source data (cells) will be used to format axis value labels; otherwise, false.
Remarks
If Number
- If axis is Category
Axis or DateAxis , then NumberFormat of the first cell in CategoryLabels will be used.Reference - If axis is Value
Axis , then NumberFormat of the first cell in ValuesReference of the chart's first series will be used.
Otherwise, if Number
Otherwise, if number format cannot be retrieved by any previously described means, then "General" number format will be used to format axis value labels.
Default value of this property is true.
Outline
Gets or sets the outline formatting options.
Property Value
The outline formatting options.
ReverseOrder
Gets or sets a value indicating whether values on the axis shall be reversed so they go from maximum to minimum.
This value is currently not supported when exporting a chart to PDF, XPS, or image formats. This value is always exported as false.
Property Value
- System.
Boolean
true if values on the axis shall be reversed so they go from maximum to minimum; otherwise, false.
Remarks
Setting the value also changes position of the axis perpendicular to this one. If value is true, axis perpendicular to this one will be positioned at the top (if horizontal) or at the right (if vertical) of the plot area; otherwise, if value is false, axis perpendicular to this one will be positioned at the bottom (if horizontal) or at the left (if vertical) of the plot area.
TextBoxFormat
Gets or sets the text box formatting.
Property Value
The text box formatting.
TextFormat
Gets or sets the text formatting options.
Property Value
The text formatting options.
Title
Gets the axis title.
Property Value
The axis title.
Methods
ChangeAxisType(AxisType)
Changes the type of the axis.
Parameters
axisType
- Axis
Type
New type of the axis.
Returns
ChangeAxisType<TChartAxis>()
Changes the type of the axis.
Returns
- TChart
Axis
ChartTChartAxis
type, if this instance is not of TChartAxis
type; otherwise, this instance.
Type Parameters
TChartAxis
New type of the axis.
Delete()
Deletes axis.
ToString()
Returns a System.
Returns
- System.
String
A System.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).