Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class CategoryAxis

java.lang.Object
  extended by com.aspose.cells.Axis
      extended by com.aspose.cells.CategoryAxis
All Implemented Interfaces:
java.lang.Cloneable

public class CategoryAxis
extends Axis

Encapsulates the object that represents a chart's category axis.


Method Summary
 short getBaseUnitScale()
          Gets the base unit scale for the category axis.
 short getCategoryType()
          Gets the category axis type.
 int getCrossAt()
          Gets the point on the category axis where the other axis crosses.
 short getMajorUnit()
          Gets the major units for the axis.
 short getMajorUnitScale()
          Gets the major unit scale for the category axis.
 double getMaxValue()
          Gets the max value of axis.
 short getMinorUnit()
          Gets the minor units for the axis.
 short getMinorUnitScale()
          Gets the minor unit scale for the category axis.
 int getMinValue()
          Gets the min value of the axis.
 int getTickLabelSpacing()
          Gets the number of category between tick-mark labels.
 short getTickMarkSpacing()
          Gets the number of category between tick marks.
 short getTickOffset()
          Gets the distance between the levels of labels, and the distance between the first level and the axis line.
 Title getTitle()
          Gets the category axis' title.
 boolean isAutoCross()
          Indicates whether Microsoft Workbook automatically sets the axis crossing point.
 boolean isAutoMajorUnit()
          Indicates whether Microsoft Workbook automatically sets the major unit.
 boolean isAutoMax()
          Indicates whether Microsoft Workbook automatically sets the max value.
 boolean isAutoMin()
          Indicates whether Microsoft Workbook automatically sets the min value.
 boolean isAutoMinorUnit()
          Indicates whether Microsoft Workbook automatically sets the minor unit.
 boolean isBaseUnitAuto()
          Indicates whether Microsoft Workbook automatically sets the base unit.
 boolean isBetweenCategories()
          Indicates whether the value axis crosses the category axis between categories.
 boolean isCrossAtMax()
          Indicates whether the axis crosses at the maximum value.
 boolean isReversed()
          Indicates whether Microsoft Workbook plots data points from last to first.
 void setBaseUnitScale(short unitScale)
          Sets the base unit scale for the category axis.
 void setBetweenCategories(boolean isBetweenCategories)
          Sets whether the value axis crosses the category axis between categories.
 void setCategoryType(int type)
          Sets the category axis type.
 void setCrossAt(double at)
          Sets the point on the category axis where the other axis crosses.
 void setCrossAtMax(boolean isCrossAtMax)
          Sets whether the axis crosses at the maximum value.
 void setMajorUnit(double unit)
          Sets the major units for the axis.
 void setMajorUnitScale(short unitScale)
          Sets the major unit scale for the category axis.
 void setMaxValue(double value)
          Sets the max value of axis.
 void setMinorUnit(double unit)
          Sets the minor units for the axis.
 void setMinorUnitScale(short unitScale)
          Sets the minor unit scale for the category axis.
 void setMinValue(double value)
          Sets the min value of the axis.
 void setReversed(boolean isReversed)
          Sets whether Microsoft Workbook plots data points from last to first.
 void setTickLabelSpacing(int tickLabelSpacing)
          Sets the number of category between tick-mark labels.
 void setTickMarkSpacing(int tickMarkSpacing)
          Sets the number of category between tick marks.
 void setTickOffset(short offset)
          Sets the distance between the levels of labels, and the distance between the first level and the axis line.
 
Methods inherited from class com.aspose.cells.Axis
getArea, getAxisLine, getBackgroundMode, getDisplayUnitLabel, getDisplayUnitType, getFont, getMajorGridLines, getMajorTickMark, getMinorGridLines, getMinorTickMark, getNumber, getNumberFormat, getRotation, getTextDirection, getTickLabelPosition, isAutoScaleFont, isDisplayUnitLabelShown, isNumberFormatLinked, isVisible, setAutoScaleFont, setAxisLine, setBackgroundMode, setDisplayUnitLabelShown, setDisplayUnitType, setFont, setMajorTickMark, setMinorTickMark, setNumber, setNumberFormat, setNumberFormatLinked, setRotation, setTextDirection, setTickLabelPosition, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTitle

public Title getTitle()
Gets the category axis' title.

Returns:
the category axis' title.
Throws:
CellsException - if chart has been removed.

getCrossAt

public int getCrossAt()
Gets the point on the category axis where the other axis crosses.

Returns:
the point where the other axis crosses.
Throws:
CellsException - if chart has been removed.

setCrossAt

public void setCrossAt(double at)
Sets the point on the category axis where the other axis crosses.

Parameters:
at - the point where the other axis crosses.
Throws:
CellsException - if chart has been removed.

getTickLabelSpacing

public int getTickLabelSpacing()
Gets the number of category between tick-mark labels.

Returns:
the number of category between tick-mark labels.
Throws:
CellsException - if chart has been removed.

setTickLabelSpacing

public void setTickLabelSpacing(int tickLabelSpacing)
Sets the number of category between tick-mark labels.

Parameters:
tickLabelSpacing - the number of category between tick-mark labels.
Throws:
CellsException - if chart has been removed.

getTickMarkSpacing

public short getTickMarkSpacing()
Gets the number of category between tick marks.

Returns:
the number of category between tick marks.
Throws:
CellsException - if chart has been removed.

setTickMarkSpacing

public void setTickMarkSpacing(int tickMarkSpacing)
Sets the number of category between tick marks.

Parameters:
tickMarkSpacing - the number of category between tick marks.
Throws:
CellsException - if chart has been removed.

getTickOffset

public short getTickOffset()
Gets the distance between the levels of labels, and the distance between the first level and the axis line. The default distance is 100 percent, which represents the default spacing between the axis labels and the axis line.

Returns:
the distance between the levels of labels, and the distance between the first level and the axis line.

setTickOffset

public void setTickOffset(short offset)
Sets the distance between the levels of labels, and the distance between the first level and the axis line.

Parameters:
offset - The value can be an integer percentage from 0 through 1000, relative to the axis label’s font size.

getCategoryType

public short getCategoryType()
Gets the category axis type.

Returns:
the category axis type.
Throws:
CellsException - if chart has been removed.
See Also:
setCategoryType(int)

setCategoryType

public void setCategoryType(int type)
Sets the category axis type.

Parameters:
type - the category axis type. It could be one of the following values:
CategoryType.AUTOMATIC_SCALE
CategoryType.CATEGORY_SCALE
CategoryType.TIME_SCALE
Throws:
CellsException - if chart has been removed.
java.lang.IllegalArgumentException - if category type is invalid.

getBaseUnitScale

public short getBaseUnitScale()
Gets the base unit scale for the category axis.

Returns:
the base unit scale
Throws:
CellsException - if chart has been removed.
See Also:
setBaseUnitScale(short)

isBaseUnitAuto

public boolean isBaseUnitAuto()
Indicates whether Microsoft Workbook automatically sets the base unit.

Returns:
true the base unit is auto; false the base unit is user customed.
Throws:
CellsException - if chart has been removed.

setBaseUnitScale

public void setBaseUnitScale(short unitScale)
Sets the base unit scale for the category axis.

Parameters:
unitScale - the base unit scale. It could be one of the following values:
TimeUnit.DAYS
TimeUnit.MONTHS
TimeUnit.YEARS
Throws:
CellsException - if chart has been removed.

getMajorUnit

public short getMajorUnit()
Gets the major units for the axis.

Returns:
the major units for the axis.
Throws:
CellsException - if chart has been removed.

setMajorUnit

public void setMajorUnit(double unit)
Sets the major units for the axis.

Parameters:
unit - the major units for the axis.
Throws:
CellsException - if chart has been removed.

getMajorUnitScale

public short getMajorUnitScale()
Gets the major unit scale for the category axis.

Returns:
the major unit scale.
Throws:
CellsException - if chart has been removed.
See Also:
setBaseUnitScale(short)

setMajorUnitScale

public void setMajorUnitScale(short unitScale)
Sets the major unit scale for the category axis.

Parameters:
unitScale - the major unit scale.
Throws:
CellsException - if chart has been removed.
See Also:
setBaseUnitScale(short)

getMinorUnit

public short getMinorUnit()
Gets the minor units for the axis.

Returns:
the minor units for the axis.
Throws:
CellsException - if chart has been removed.

setMinorUnit

public void setMinorUnit(double unit)
Sets the minor units for the axis.

Parameters:
unit - the minor units for the axis.
Throws:
CellsException - if chart has been removed.

getMinorUnitScale

public short getMinorUnitScale()
Gets the minor unit scale for the category axis.

Returns:
the minor unit scale.
Throws:
CellsException - if chart has been removed.
See Also:
setBaseUnitScale(short)

setMinorUnitScale

public void setMinorUnitScale(short unitScale)
Sets the minor unit scale for the category axis.

Parameters:
unitScale - the minor unit scale
Throws:
CellsException - if chart has been removed.
See Also:
setBaseUnitScale(short)

getMinValue

public int getMinValue()
Gets the min value of the axis.

Returns:
the min value of the axis.
Throws:
CellsException - if chart has been removed.

setMinValue

public void setMinValue(double value)
Sets the min value of the axis.

Parameters:
value - the min value of the axis.
Throws:
CellsException - if chart has been removed.

getMaxValue

public double getMaxValue()
Gets the max value of axis.

Returns:
the max value of axis.
Throws:
CellsException - if chart has been removed.

setMaxValue

public void setMaxValue(double value)
Sets the max value of axis.

Parameters:
value - the max value of axis.
Throws:
CellsException - if chart has been removed.

setCrossAtMax

public void setCrossAtMax(boolean isCrossAtMax)
Sets whether the axis crosses at the maximum value.

Parameters:
isCrossAtMax - whether the axis crosses at the maximum value.
Throws:
CellsException - if chart has been removed.

isCrossAtMax

public boolean isCrossAtMax()
Indicates whether the axis crosses at the maximum value.

Returns:
whether the axis crosses at the maximum value.
Throws:
CellsException - if chart has been removed.

setReversed

public void setReversed(boolean isReversed)
Sets whether Microsoft Workbook plots data points from last to first.

Parameters:
isReversed - whether Microsoft Workbook plots data points from last to first.
Throws:
CellsException - if chart has been removed.

isReversed

public boolean isReversed()
Indicates whether Microsoft Workbook plots data points from last to first.

Returns:
whether Microsoft Workbook plots data points from last to first.
Throws:
CellsException - if chart has been removed.

setBetweenCategories

public void setBetweenCategories(boolean isBetweenCategories)
Sets whether the value axis crosses the category axis between categories.

Parameters:
isBetweenCategories - whether the value axis crosses the category axis between categories.
Throws:
CellsException - if chart has been removed.

isBetweenCategories

public boolean isBetweenCategories()
Indicates whether the value axis crosses the category axis between categories.

Returns:
whether the value axis crosses the category axis between categories.
Throws:
CellsException - if chart has been removed.

isAutoMax

public boolean isAutoMax()
Indicates whether Microsoft Workbook automatically sets the max value.

Returns:
true the max value is auto; false the max value is user customed.
Throws:
CellsException - if chart has been removed.

isAutoMin

public boolean isAutoMin()
Indicates whether Microsoft Workbook automatically sets the min value.

Returns:
true the min value is auto; false the min value is user customed.
Throws:
CellsException - if chart has been removed.

isAutoMajorUnit

public boolean isAutoMajorUnit()
Indicates whether Microsoft Workbook automatically sets the major unit.

Returns:
true the major unit is auto; false the major unit is user customed.
Throws:
CellsException - if chart has been removed.

isAutoMinorUnit

public boolean isAutoMinorUnit()
Indicates whether Microsoft Workbook automatically sets the minor unit.

Returns:
true the minor unit is auto; false the minor unit is user customed.
Throws:
CellsException - if chart has been removed.

isAutoCross

public boolean isAutoCross()
Indicates whether Microsoft Workbook automatically sets the axis crossing point.

Returns:
whether Microsoft Workbook automatically sets the axis crossing point.
Throws:
CellsException - if chart has been removed.