Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class CategoryAxis

java.lang.Object
  extended by com.aspose.cells.CategoryAxis

public class CategoryAxis
extends java.lang.Object

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


Method Summary
 Line getAxisLine()
          Gets the appearance of an axis.
 short getCategoryType()
          Gets the category axis type.
 int getCrossAt()
          Gets the point on the category axis where the other axis crosses.
 Font getFont()
          Gets a Font object that represents the font of the specified TickLabels object.
 Line getMajorGridLines()
          Gets major gridlines on a chart axis.
 int getMajorTickMark()
          Gets the type of major tick mark for the axis.
 Line getMinorGridLines()
          Gets minor gridlines on a chart axis.
 int getMinorTickMark()
          Gets the type of minor tick mark for the axis.
 int getNumber()
          Gets the format index for the TickLabels object.
 int getRotation()
          Gets text rotation angle.
 int getTickLabelPosition()
          Gets the position of tick-mark labels on the axis.
 int getTickLabelSpacing()
          Gets the number of category between tick-mark labels.
 short getTickMarkSpacing()
          Gets the number of category between tick marks.
 Title getTitle()
          Gets the category axis' title.
 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.
 boolean isVisible()
          Indicates whether the axis is visible.
 void setAxisLine(Line line)
          Sets the appearance of an 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(int 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 setFont(Font font)
          Sets a Font object that represents the font of the specified TickLabels object.
 void setMajorTickMark(int majorTickMark)
          Sets the type of major tick mark for the axis.
 void setMinorTickMark(int minorTickMark)
          Sets the type of minor tick mark for the axis.
 void setNumber(int number)
          Sets the format index for the TickLabels object.
 void setReversed(boolean isReversed)
          Sets whether Microsoft Workbook plots data points from last to first.
 void setRotation(int rotation)
          Sets text rotation angle.Must be between -90 and 90.
 void setTickLabelPosition(int tickLabelPosition)
          Sets the position of tick-mark labels on the axis.
 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 setVisible(boolean isVisible)
          Sets whether the axis is visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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(int 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.

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.

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.

getAxisLine

public Line getAxisLine()
Gets the appearance of an axis.

Returns:
the appearance of an axis.
Throws:
CellsException - if chart has bean removed.

setAxisLine

public void setAxisLine(Line line)
Sets the appearance of an axis.

Parameters:
line - the appearance of an axis.
Throws:
CellsException - if chart has bean removed.

getMajorGridLines

public Line getMajorGridLines()
Gets major gridlines on a chart axis.

Returns:
major gridlines on a chart axis.
Throws:
CellsException - if chart has bean removed.

getMinorGridLines

public Line getMinorGridLines()
Gets minor gridlines on a chart axis.

Returns:
minor gridlines on a chart axis.
Throws:
CellsException - if chart has bean removed.

getFont

public Font getFont()
Gets a Font object that represents the font of the specified TickLabels object.

Returns:
a Font object.
Throws:
CellsException - if chart has bean removed.

setFont

public void setFont(Font font)
Sets a Font object that represents the font of the specified TickLabels object.

Parameters:
font - a Font object.
Throws:
CellsException - if chart has bean removed.

getNumber

public int getNumber()
Gets the format index for the TickLabels object.

Returns:
the format index
Throws:
CellsException - if chart has bean removed.
See Also:
Style.setNumber(int)

setNumber

public void setNumber(int number)
Sets the format index for the TickLabels object.

Parameters:
number - the format index.
Throws:
java.lang.IllegalArgumentException - if format number is not built-in number.
CellsException - if chart has bean removed.
See Also:
Style.setNumber(int)

getRotation

public int getRotation()
Gets text rotation angle.

Returns:
text rotation angle.
Throws:
CellsException - if chart has bean removed.

setRotation

public void setRotation(int rotation)
Sets text rotation angle.Must be between -90 and 90.

Parameters:
rotation - text rotation angle.
Throws:
java.lang.IllegalArgumentException - if rotation is not between -90 and 90.
CellsException - if chart has bean removed.

getMajorTickMark

public int getMajorTickMark()
Gets the type of major tick mark for the axis.

Returns:
the type of major tick mark for the axis.
Throws:
CellsException - if chart has bean removed.
See Also:
setMajorTickMark(int)

setMajorTickMark

public void setMajorTickMark(int majorTickMark)
Sets the type of major tick mark for the axis.

Parameters:
majorTickMark - the type of major tick mark for the axis. It could be one of the following values:
TickMarkerType.CROSS
TickMarkerType.INSIDE
TickMarkerType.NONE
TickMarkerType.OUTSIDE
Throws:
java.lang.IllegalArgumentException - if majorTickMark is invalid tick mark type.
CellsException - if chart has bean removed.

getMinorTickMark

public int getMinorTickMark()
Gets the type of minor tick mark for the axis.

Returns:
the type of minor tick mark for the axis.
Throws:
CellsException - if chart has bean removed.
See Also:
setMajorTickMark(int)

setMinorTickMark

public void setMinorTickMark(int minorTickMark)
Sets the type of minor tick mark for the axis.

Parameters:
minorTickMark - the type of minor tick mark for the axis.
Throws:
CellsException - if chart has bean removed.
java.lang.IllegalArgumentException - if minorTickMark is invalid tick mark type.
See Also:
setMajorTickMark(int)

getTickLabelPosition

public int getTickLabelPosition()
Gets the position of tick-mark labels on the axis.

Returns:
the position of tick-mark labels on the axis.
Throws:
CellsException - if chart has bean removed.
See Also:
setTickLabelPosition(int)

setTickLabelPosition

public void setTickLabelPosition(int tickLabelPosition)
Sets the position of tick-mark labels on the axis.

Parameters:
tickLabelPosition - the position of tick-mark labels on the axis. * It could be one of the following values:
TickLabelPositionType.HIGH
TickLabelPositionType.LOW
TickLabelPositionType.NEXT_TO_AXIS
TickLabelPositionType.NONE
Throws:
java.lang.IllegalArgumentException - if tick label position type is invalid.
CellsException - if chart has bean removed.

isVisible

public boolean isVisible()
Indicates whether the axis is visible.

Returns:
whether the axis is visible.
Throws:
CellsException - if chart has bean removed.

setVisible

public void setVisible(boolean isVisible)
Sets whether the axis is visible.

Parameters:
isVisible - whether the axis is visible.
Throws:
CellsException - if chart has bean removed.