public abstract class ChartAxis extends Object
Modifier and Type | Method and Description |
---|---|
ChartAxis |
changeAxisType(AxisType axisType)
Changes the type of the axis.
|
<TChartAxis extends ChartAxis> |
changeAxisType(Class<TChartAxis> classType)
Changes the type of the axis.
|
void |
delete()
Deletes axis.
|
abstract AxisType |
getAxisType()
|
AxisLabelsPosition |
getLabelsPosition()
Gets the axis labels position.
|
AxisGridlines |
getMajorGridlines()
Gets the major gridlines.
|
TickMarkType |
getMajorTickMarkType()
Gets the major tick marks position.
|
AxisGridlines |
getMinorGridlines()
Gets the minor gridlines.
|
TickMarkType |
getMinorTickMarkType()
Gets the minor tick marks position.
|
String |
getNumberFormat()
Gets the number format used for formatting axis value labels.
|
ChartTitle |
getTitle()
Gets the axis title.
|
boolean |
isNumberFormatLinkedToSource()
Gets a value indicating whether number format from chart's source data (cells) will be used to format axis value labels.
|
boolean |
isReverseOrder()
Gets a value indicating whether values on the axis shall be reversed so they go from maximum to minimum.
|
boolean |
isVisible()
Gets a value indicating whether axis is visible.
|
void |
setLabelsPosition(AxisLabelsPosition axisLabelsPosition)
Gets the axis labels position.
|
void |
setMajorTickMarkType(TickMarkType tickMarkType)
Sets the major tick marks position.
|
void |
setMinorTickMarkType(TickMarkType tickMarkType)
Sets the minor tick marks position.
|
void |
setNumberFormat(String numberFormat)
Sets the number format used for formatting axis value labels.
|
void |
setNumberFormatLinkedToSource(boolean value)
Gets a value indicating whether number format from chart's source data (cells) will be used to format axis value labels.
|
void |
setReverseOrder(boolean reverseOrder)
Sets a value indicating whether values on the axis shall be reversed so they go from maximum to minimum.
|
void |
setVisible(boolean visibility)
Sets a value indicating whether axis is visible.
|
String |
toString()
Returns a
String that represents this ChartAxis instance. |
public final ChartAxis changeAxisType(AxisType axisType)
public final <TChartAxis extends ChartAxis> TChartAxis changeAxisType(Class<TChartAxis> classType)
TChartAxis
- New type of the axis.classType
- Class of new type of the axis.ChartAxis
instance of TChartAxis
type, if this instance is not of TChartAxis
type; otherwise, this instance.public final void delete()
public abstract AxisType getAxisType()
public final AxisLabelsPosition getLabelsPosition()
public final AxisGridlines getMajorGridlines()
public final TickMarkType getMajorTickMarkType()
public final AxisGridlines getMinorGridlines()
public final TickMarkType getMinorTickMarkType()
public final String getNumberFormat()
If isNumberFormatLinkedToSource()
is true
, then number format from chart's source data(cells) will be used to format axis value labels based on the following logic:
CategoryAxis
or DateAxis
, then number format
of the first cell in ExcelChart.getCategoryLabelsReference()
will be used.ValueAxis
, then number format
of the first cell in ChartSeries.getValuesReference()
of the chart's first series will be used. Otherwise, if NumberFormat
is specified, then it will be used to format axis value labels.
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 is true
.
public final ChartTitle getTitle()
public final boolean isNumberFormatLinkedToSource()
If true
, then number format from chart's source data(cells) will be used to format axis value labels based on the following logic:
CategoryAxis
or DateAxis
, then number format
of the first cell in ExcelChart.getCategoryLabelsReference()
will be used.ValueAxis
, then number format
of the first cell in ChartSeries.getValuesReference()
of the chart's first series will be used. Otherwise, if NumberFormat
is specified, then it will be used to format axis value labels.
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 is true
.
true
if number format from chart's source data (cells) will be used to format axis value labels; otherwise, false
.public final boolean isReverseOrder()
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.
true
if values on the axis shall be reversed so they go from maximum to minimum; otherwise, false
.public final boolean isVisible()
Default value of this property is true
.
true
if axis is visible; otherwise, false
.public final void setLabelsPosition(AxisLabelsPosition axisLabelsPosition)
axisLabelsPosition
- The axis labels position.public final void setMajorTickMarkType(TickMarkType tickMarkType)
tickMarkType
- The major tick marks position.public final void setMinorTickMarkType(TickMarkType tickMarkType)
tickMarkType
- The minor tick marks position.public final void setNumberFormat(String numberFormat)
setNumberFormatLinkedToSource(boolean)
to false
.
If isNumberFormatLinkedToSource()
is true
, then number format from chart's source data(cells) will be used to format axis value labels based on the following logic:
CategoryAxis
or DateAxis
, then number format
of the first cell in ExcelChart.getCategoryLabelsReference()
will be used.ValueAxis
, then number format
of the first cell in ChartSeries.getValuesReference()
of the chart's first series will be used. Otherwise, if NumberFormat
is specified, then it will be used to format axis value labels.
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 is true
.
numberFormat
- The number format used for formatting axis value labels.public final void setNumberFormatLinkedToSource(boolean value)
If isNumberFormatLinkedToSource()
true
, then number format from chart's source data(cells) will be used to format axis value labels based on the following logic:
CategoryAxis
or DateAxis
, then number format
of the first cell in ExcelChart.getCategoryLabelsReference()
will be used.ValueAxis
, then number format
of the first cell in ChartSeries.getValuesReference()
of the chart's first series will be used. Otherwise, if NumberFormat
is specified, then it will be used to format axis value labels.
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 is true
.
value
- true
if number format from chart's source data (cells) will be used to format axis value labels; otherwise, false
.public final void setReverseOrder(boolean reverseOrder)
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.
reverseOrder
- true
if values on the axis shall be reversed so they go from maximum to minimum; otherwise, false
.public final void setVisible(boolean visibility)
visibility
- true
if axis is visible; otherwise, false
.© GemBox Ltd. — All rights reserved.