[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IAxis

IAxis Interface

Represents a single axis in a chart.

An IAxis provides access to axis settings such as the axis group, title, scaling, crossing behavior, tick labels, and gridlines for category, value, and series axes.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface IAxis
Public Interface IAxis
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Month", "Sales"},
    {"Jan", 100},
    {"Feb", 120},
    {"Mar", 140}
};
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, true);
IAxis axis = shape.Chart.Axes.Item(AxisType.Category);
axis.AxisTitle.Text = "Month";

Properties

Name Description
ActualCategoryType

Gets the actual category axis type.

This property returns the effective CategoryType used by the axis. If the category axis type is set to AutomaticScale, the returned value reflects the type resolved from the chart data and chart type.

AxisBetweenCategories

Gets or sets whether the value axis crosses the category axis between categories.

This property applies to a category axis. A value of true indicates that the value axis crosses the category axis between categories instead of at the category marks.

AxisGroup

Gets the axis group of the axis.

AxisTitle

Gets the title of the axis.

BaseUnit

Gets or sets the base unit for the specified category axis.

For a time-scale category axis, the base unit specifies whether the axis is based on days, months, or years.

BaseUnitIsAuto

Gets or sets whether the base unit is selected automatically for the specified category axis.

If this property is true, Microsoft Excel chooses an appropriate base unit for the category axis automatically. The default value is true.

CategoryNames

Gets or sets all the category names for the specified axis as a text array.

Returns the category labels currently used by the axis.

CategoryType

Gets or sets the category axis type.

Crosses

Gets or sets the point on the specified axis where the other axis crosses.

Returns the current axis crossing mode, such as Automatic, Custom, Maximum, or Minimum. If the crossing mode is Custom, use CrossesAt to get the exact crossing position.

CrossesAt

Gets or sets the point on the value axis where the category axis crosses it.

This property applies only to the value axis. To use a custom crossing point, set the axis crosses mode to Custom.

DisplayUnit

Gets or sets the display unit label for the value axis.

Use this property to determine how values on the value axis are scaled for display, such as thousands or millions.

DisplayUnitCustom

Gets or sets the custom display unit value for the value axis.

This property returns the displayed unit value when DisplayUnit is set to Custom. The value is from 0 through 10E307.

DisplayUnitLabel

Gets the IDisplayUnitLabel object for this axis.

The display unit label shows the unit specified by DisplayUnit or DisplayUnitCustom on the axis. Returns null if HasDisplayUnitLabel is false.

Format

Gets the chart format of the axis.

Use the returned IChartFormat object to access the fill and line formatting settings of the axis.

HasDisplayUnitLabel

Gets or sets whether the display unit label is shown on the specified axis.

Returns true if the label specified by the DisplayUnit or DisplayUnitCustom property is displayed on the axis.

HasMajorGridlines

Gets or sets whether the axis displays major gridlines.

This property applies only to axes in the primary axis group.

HasMinorGridlines

Gets or sets whether the axis has minor gridlines.

This property indicates whether minor gridlines are enabled for the axis. Only axes in the primary axis group can have gridlines.

HasTitle

Gets or sets whether the axis has a visible title.

This property indicates whether the axis title is displayed. Use AxisTitle to access and configure the title when this property is true.

LogBase

Gets or sets the base of the logarithm used by the axis when log scales are enabled.

Use this property with ScaleType to read the logarithmic base of a value axis configured with Logarithmic.

MajorGridlines

Gets the major gridlines for the axis.

Only axes in the primary axis group can have gridlines. You can use the returned IGridlines object to configure the appearance of major gridlines after enabling them with HasMajorGridlines.

MajorTickMark

Gets or sets the type of major tick mark for the specified axis.

This property determines whether major tick marks are displayed inside the axis, outside the axis, across the axis, or not displayed.

MajorUnit

Gets or sets the major unit for the value axis.

The major unit determines the interval between major tick marks and major gridlines on the value axis.

MajorUnitIsAuto

Gets or sets whether Excel automatically calculates the major unit for the value axis.

This property is true when the major unit is determined automatically by Excel, and false when a custom major unit is used.

MajorUnitScale

Gets or sets the major unit scale for the category axis when CategoryType is TimeScale.

If the major unit is calculated automatically, this property returns the current base unit.

MaximumScale

Gets or sets the maximum value on the value axis.

Use MaximumScaleIsAuto to determine whether this value is calculated automatically by Excel or set explicitly.

MaximumScaleIsAuto

Gets or sets whether Excel calculates the maximum value for the value axis automatically.

When this property is true, the maximum scale is determined by Excel. When it is false, the maximum scale is set explicitly.

MinimumScale

Gets or sets the minimum value on the value axis.

Use MinimumScaleIsAuto to determine whether this value is calculated automatically by Excel or set explicitly.

MinimumScaleIsAuto

Gets or sets whether Excel calculates the minimum value for the value axis automatically.

When this property is true, the minimum scale is determined by Excel. When it is false, the minimum scale is set explicitly.

MinorGridlines

Gets the IGridlines object that represents the minor gridlines for the specified axis.

Only axes in the primary axis group can have gridlines. You can use the returned object to configure the appearance of minor gridlines after enabling them with HasMinorGridlines.

MinorTickMark

Gets or sets the type of minor tick mark for the specified axis.

Use this property to determine whether minor tick marks are displayed inside the axis, outside the axis, across the axis, or not displayed.

MinorUnit

Gets or sets the minor unit on the value axis.

The minor unit determines the interval between minor tick marks on a value axis. If MinorUnitIsAuto is true, the returned value is calculated automatically.

MinorUnitIsAuto

Gets or sets whether Microsoft Excel calculates minor units for the value axis.

This property is true if the minor unit for the value axis is determined automatically by Excel.

MinorUnitScale

Gets or sets the minor unit scale for the category axis when CategoryType is TimeScale.

If the minor unit is calculated automatically, this property returns the current base unit.

Parent

Gets the IAxes collection that contains this axis.

Use this property to access the parent axes collection of the current axis when you need to work with other axes on the same chart.

ReversePlotOrder

Gets or sets whether Excel plots data points on the axis from last to first.

This property is true when the axis uses reverse plot order.

ScaleType

Gets or sets the scale type of the value axis.

Use this property to determine whether the value axis uses a linear or logarithmic scale.

TickLabelPosition

Gets or sets the position of tick-mark labels on the specified axis.

Use this property to determine whether axis labels are displayed on the low side, high side, next to the axis, or hidden.

TickLabelSpacing

Gets or sets the number of categories or series between tick-mark labels.

This property applies only to category and series axes. When tick label spacing is automatic, this property returns 1.

TickLabelSpacingIsAuto

Gets or sets whether tick label spacing is determined automatically.

When this property is true, the axis automatically calculates the spacing between tick-mark labels. When it is false, the spacing can be controlled by TickLabelSpacing.

TickLabels

Gets the tick-mark labels for this axis.

The returned ITickLabels object provides access to label formatting and layout settings for the axis, such as number format, text direction, and label offset.

TickMarkSpacing

Gets or sets the number of categories or series between tick marks.

This property applies only to category and series axes.

Type

Gets the axis type.

Visible

Gets or sets whether the axis is visible.

This property indicates whether the axis is displayed in the chart.