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.
|
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(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()
IAxis
An axis id is automatically assigned when axis is created.
public IAxis.Direction getDirection()
IAxis
The axis direction is set when axis is created, and won't be changed.
getDirection
in interface IAxis
public IAxis.Position getPosition()
IAxis
getPosition
in interface IAxis
public void setPosition(IAxis.Position position)
IAxis
setPosition
in interface IAxis
position
- the axis positionpublic void setRange(Range range)
IAxis
public void setRange(Range range, boolean update)
range
- the axis rangeupdate
- true if updating the chart layoutpublic void enableLogScale(boolean enabled) throws IllegalStateException
IAxis
enableLogScale
in interface IAxis
enabled
- true if enabling log scalesIllegalStateException
- if minimum value of series belonging to this axis is less
than zero.public boolean isLogScaleEnabled()
IAxis
isLogScaleEnabled
in interface IAxis
public IGrid getGrid()
IAxis
public void adjustRange()
IAxis
adjustRange
in interface IAxis
public void adjustRange(boolean update)
update
- true if updating chart layoutpublic void zoomIn()
IAxis
public void zoomIn(double coordinate)
IAxis
public void zoomOut()
IAxis
public void zoomOut(double coordinate)
IAxis
public void scrollUp()
IAxis
public void scrollDown()
IAxis
scrollDown
in interface IAxis
public boolean isCategoryEnabled()
IAxis
isCategoryEnabled
in interface IAxis
public boolean isValidCategoryAxis()
public void enableCategory(boolean enabled)
IAxis
enableCategory
in interface IAxis
enabled
- true if enabling categorypublic void setCategorySeries(String[] series)
IAxis
setCategorySeries
in interface IAxis
series
- the category seriespublic String[] getCategorySeries()
IAxis
getCategorySeries
in interface IAxis
public int getPixelCoordinate(double dataCoordinate)
IAxis
getPixelCoordinate
in interface IAxis
dataCoordinate
- 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)
IAxis
getDataCoordinate
in interface IAxis
pixelCoordinate
- 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)
IAxis
addDisposeListener
in interface IAxis
listener
- the dispose listenerpublic void updateLayoutData()
public void refresh()
public boolean isDateEnabled()
Copyright © 2014. All rights reserved.