IAxis.Direction, IAxis.Position| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_LOG_SCALE_MAX
the default maximum value of log scale range
|
static double |
DEFAULT_LOG_SCALE_MIN
the default minimum value of log scale range
|
static double |
DEFAULT_MAX
the default maximum value of range
|
static double |
DEFAULT_MIN
the default minimum value of range
|
static int |
MARGIN
the margin in pixels
|
| Constructor and Description |
|---|
Axis(int id,
IAxis.Direction direction,
Chart chart)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDisposeListener(IDisposeListener listener)
Adds the dispose listener.
|
void |
adjustRange()
Adjusts the axis range to the series belonging to the axis, so that all
series are completely shown.
|
void |
adjustRange(boolean update)
Adjusts the axis range to the series belonging to the axis.
|
protected void |
dispose()
Disposes the resources.
|
void |
enableCategory(boolean enabled)
Enables category.
|
void |
enableLogScale(boolean enabled)
Enables the log scale.
|
java.lang.String[] |
getCategorySeries()
Gets the category series.
|
double |
getDataCoordinate(int pixelCoordinate)
Gets the data coordinate corresponding to the given pixel coordinate on
plot area.
|
double |
getDataCoordinate(int pixelCoordinate,
double lower,
double upper)
Gets the data coordinate corresponding to the given pixel coordinate on
plot area.
|
IAxis.Direction |
getDirection()
Gets the axis direction.
|
IGrid |
getGrid()
Gets the grid.
|
int |
getId()
Gets the axis id.
|
int |
getNumRisers()
Gets the number of risers per category.
|
int |
getPixelCoordinate(double dataCoordinate)
Gets the pixel coordinate corresponding to the given data coordinate.
|
int |
getPixelCoordinate(double dataCoordinate,
double lower,
double upper)
Gets the pixel coordinate corresponding to the given data coordinate.
|
IAxis.Position |
getPosition()
Gets the axis position.
|
Range |
getRange()
Gets the axis range.
|
AxisTick |
getTick()
Gets the axis tick.
|
ITitle |
getTitle()
Gets the axis title.
|
boolean |
isCategoryEnabled()
Gets the state indicating if category is enabled.
|
boolean |
isDateEnabled()
Gets the state indicating if date is enabled.
|
boolean |
isHorizontalAxis()
Checks if the axis is horizontal.
|
boolean |
isLogScaleEnabled()
Gets the state indicating if log scale is enabled.
|
boolean |
isValidCategoryAxis()
Gets the state indicating if the axis is valid category axis.
|
void |
refresh()
Refreshes the cache.
|
void |
scrollDown()
Scrolls up the axis.
|
void |
scrollUp()
Scrolls up the axis.
|
void |
setCategorySeries(java.lang.String[] series)
Sets the category series.
|
void |
setNumRisers(int numRisers)
Sets the number of risers per category.
|
void |
setPosition(IAxis.Position position)
Sets the axis position.
|
void |
setRange(Range range)
Sets the axis range.
|
void |
setRange(Range range,
boolean update)
Sets the axis range.
|
void |
updateLayoutData()
Updates the layout data.
|
void |
zoomIn()
Zooms in the axis.
|
void |
zoomIn(double coordinate)
Zooms in the axis at the given coordinate.
|
void |
zoomOut()
Zooms out the axis.
|
void |
zoomOut(double coordinate)
Zooms out the axis at the given coordinate.
|
public static final int MARGIN
public static final double DEFAULT_MIN
public static final double DEFAULT_MAX
public static final double DEFAULT_LOG_SCALE_MIN
public static final double DEFAULT_LOG_SCALE_MAX
public Axis(int id,
IAxis.Direction direction,
Chart chart)
id - the axis indexdirection - the axis direction (X or Y)chart - the chartpublic int getId()
IAxisAn axis id is automatically assigned when axis is created.
public IAxis.Direction getDirection()
IAxisThe axis direction is set when axis is created, and won't be changed.
getDirection in interface IAxispublic IAxis.Position getPosition()
IAxisgetPosition in interface IAxispublic void setPosition(IAxis.Position position)
IAxissetPosition in interface IAxisposition - the axis positionpublic void setRange(Range range)
IAxispublic void setRange(Range range, boolean update)
range - the axis rangeupdate - true if updating the chart layoutpublic void enableLogScale(boolean enabled)
throws java.lang.IllegalStateException
IAxisenableLogScale in interface IAxisenabled - true if enabling log scalesjava.lang.IllegalStateException - if minimum value of series belonging to this axis is less
than zero.public boolean isLogScaleEnabled()
IAxisisLogScaleEnabled in interface IAxispublic IGrid getGrid()
IAxispublic void adjustRange()
IAxisadjustRange in interface IAxispublic void adjustRange(boolean update)
update - true if updating chart layoutpublic void zoomIn()
IAxispublic void zoomIn(double coordinate)
IAxispublic void zoomOut()
IAxispublic void zoomOut(double coordinate)
IAxispublic void scrollUp()
IAxispublic void scrollDown()
IAxisscrollDown in interface IAxispublic boolean isCategoryEnabled()
IAxisisCategoryEnabled in interface IAxispublic boolean isValidCategoryAxis()
public void enableCategory(boolean enabled)
IAxisenableCategory in interface IAxisenabled - true if enabling categorypublic void setCategorySeries(java.lang.String[] series)
IAxissetCategorySeries in interface IAxisseries - the category seriespublic java.lang.String[] getCategorySeries()
IAxisgetCategorySeries in interface IAxispublic int getPixelCoordinate(double dataCoordinate)
IAxisgetPixelCoordinate in interface IAxisdataCoordinate - the data coordinatepublic int getPixelCoordinate(double dataCoordinate,
double lower,
double upper)
dataCoordinate - the data coordinatelower - the min value of rangeupper - the max value of rangepublic double getDataCoordinate(int pixelCoordinate)
IAxisgetDataCoordinate in interface IAxispixelCoordinate - the pixel coordinate on plot areapublic double getDataCoordinate(int pixelCoordinate,
double lower,
double upper)
pixelCoordinate - the pixel coordinate on plot arealower - the min value of rangeupper - the max value of rangepublic void setNumRisers(int numRisers)
numRisers - the number of risers per categorypublic int getNumRisers()
public boolean isHorizontalAxis()
protected void dispose()
public void addDisposeListener(IDisposeListener listener)
IAxisaddDisposeListener in interface IAxislistener - the dispose listenerpublic void updateLayoutData()
public void refresh()
public boolean isDateEnabled()