public class IlvAxis extends Object implements Serializable
IlvAxis
instances are created by the IlvChart
class for each coordinate axis. These instances can be retrieved using the
IlvChart.getXAxis()
and IlvChart.getYAxis(int)
methods. The following
figure represents the x- and y-axis of a chart:
An IlvAxis
object holds the following information:
setDataRange(double, double)
method.
To toggle the automatic calculation of the data range, use the
setAutoDataRange(boolean)
method.
dataMin <= visibleMin <= visibleMax <= dataMaxThe visible range can be synchronized with the data range, using the
setAutoVisibleRange(boolean)
method. In that case, the visible
range is updated each time the data range is modified.
IlvAxisTransformer
class. The setTransformer(ilog.views.chart.IlvAxisTransformer)
method lets you modify the
transformer associated with an axis.
AxisListener
objects that are notified whenever
the axis changes.
Modifier and Type | Class and Description |
---|---|
static interface |
IlvAxis.Crossing
Defines the value where two axes cross each other.
|
Modifier and Type | Field and Description |
---|---|
static IlvAxis.Crossing |
MAX_VALUE
Predefined crossing, which specifies that an axis crosses at the
maximum visible value of another axis.
|
static IlvAxis.Crossing |
MIN_VALUE
Predefined crossing, which specifies that an axis crosses at the
minimum visible value of another axis.
|
static int |
X_AXIS
Type for abscissa axis.
|
static int |
Y_AXIS
Type for ordinate axis.
|
Modifier and Type | Method and Description |
---|---|
void |
addAxisListener(AxisListener listener)
Adds the specified listener to receive events concerning changes
on this axis.
|
double |
getDataMax()
Returns the maximum value of data along this axis.
|
double |
getDataMin()
Returns the minimum value of data along this axis.
|
IlvDataInterval |
getDataRange()
Returns the data range along this axis.
|
double |
getSpecifiedDataMax()
Returns the specified maximum value of data along this axis.
|
double |
getSpecifiedDataMin()
Returns the specified minimum value of data along this axis.
|
double |
getSpecifiedVisibleMax()
Returns the specified maximum value along this axis.
|
double |
getSpecifiedVisibleMin()
Returns the specified minimum value along this axis.
|
IlvAxisTransformer |
getTransformer()
Returns the transformer associated with this axis.
|
IlvDataInterval |
getTVisibleRange()
Returns the visible range shown by this axis, optionally
transformed by the associated transformer.
|
int |
getType()
Returns the type of this axis.
|
double |
getVisibleMax()
Returns the maximum visible value along this axis.
|
double |
getVisibleMin()
Returns the minimum visible value along this axis.
|
IlvDataInterval |
getVisibleRange()
Returns the visible range shown by this axis.
|
boolean |
isAdjusting()
Tells whether this axis is in an adjustment state.
|
boolean |
isAutoDataMax()
Tells whether the data range maximum value is automatically computed.
|
boolean |
isAutoDataMin()
Tells whether the data range minimum value is automatically computed.
|
boolean |
isAutoDataRange()
Returns
true if the data range is computed and updated
automatically. |
boolean |
isAutoVisibleRange()
Tells whether the visible range is synchronized with the data range.
|
boolean |
isBounded()
Tells whether the data range along this axis is specified.
|
boolean |
isReversed()
Indicates whether this axis is reversed.
|
boolean |
isXAxis()
Tells whether this axis is an abscissa axis.
|
boolean |
isYAxis()
Tells whether this axis is an ordinate axis.
|
void |
removeAxisListener(AxisListener listener)
Removes the specified listener.
|
void |
setAdjusting(boolean isAdjusting)
Sets the adjustment state of this axis.
|
void |
setAutoDataMax(boolean auto)
Toggles the automatic calculation of the data range maximum value.
|
void |
setAutoDataMin(boolean auto)
Toggles the automatic calculation of the data range minimum value.
|
void |
setAutoDataRange(boolean auto)
Toggles the automatic calculation of the data range.
|
void |
setAutoVisibleRange(boolean auto)
Toggles the automatic mode of the visible range.
|
void |
setDataMax(double max)
Sets the maximum value of the data range.
|
void |
setDataMin(double min)
Sets the minimum value of the data range.
|
void |
setDataRange(double min,
double max)
Sets the data range along this axis.
|
void |
setDataRange(IlvDataInterval range)
Sets the data range along this axis.
|
void |
setReversed(boolean reversed)
Sets the
reversed property of the axis. |
void |
setTransformer(IlvAxisTransformer transfo)
Sets the transformer applied to this axis.
|
void |
setVisibleMax(double max)
Sets the maximum visible value along this axis.
|
void |
setVisibleMin(double min)
Sets the minimum visible value along this axis.
|
void |
setVisibleRange(double min,
double max)
Sets the visible range along this axis.
|
void |
setVisibleRange(IlvDataInterval range)
Sets the visible range along this axis.
|
void |
synchronizeWith(IlvAxis axis,
boolean sync)
Synchronizes this axis with another one.
|
String |
toString()
Returns a string representation of this axis.
|
void |
translateVisibleRange(double delta)
Translates the visible range of the specified value.
|
public static final IlvAxis.Crossing MAX_VALUE
public static final IlvAxis.Crossing MIN_VALUE
public static final int X_AXIS
getType()
,
Constant Field Valuespublic static final int Y_AXIS
getType()
,
Constant Field Valuespublic final boolean isXAxis()
getType()
public final boolean isYAxis()
getType()
public final int getType()
public final boolean isReversed()
setReversed(boolean)
public void setReversed(boolean reversed)
reversed
property of the axis.
The values along a reversed axis are considered in reverse order.
This means for example that the minimum and maximum value will
be swapped during data projection.public IlvDataInterval getDataRange()
isBounded()
public final double getDataMin()
isBounded()
public final double getDataMax()
isBounded()
public final boolean isBounded()
-Double.MAX_VALUE
Double.MAX_VALUE
isBounded()
public final boolean isAutoDataRange()
true
if the data range is computed and updated
automatically.public void setAutoDataRange(boolean auto)
Note: The bean property "autoDataRange" must not be specified together with the bean properties "dataMin" or "dataMax".
public final double getSpecifiedDataMin()
setDataMin(double)
public final double getSpecifiedDataMax()
setDataMax(double)
public final boolean isAutoDataMin()
public void setAutoDataMin(boolean auto)
public final boolean isAutoDataMax()
public void setAutoDataMax(boolean auto)
public void setDataRange(double min, double max)
setAutoDataMin(boolean)
,
setAutoDataMax(boolean)
public void setDataRange(IlvDataInterval range)
setAutoDataMin(boolean)
,
setAutoDataMax(boolean)
public void setDataMin(double min)
Note: The bean property "dataMin" must not be specified together with the bean property "autoDataRange".
setAutoDataMin(boolean)
,
getSpecifiedDataMin()
public void setDataMax(double max)
Note: The bean property "dataMin" must not be specified together with the bean property "autoDataRange".
setAutoDataMax(boolean)
,
getSpecifiedDataMax()
public final IlvDataInterval getVisibleRange()
public final double getVisibleMin()
public final double getVisibleMax()
public IlvDataInterval getTVisibleRange()
IlvAxisTransformerException
is raised), the method
returns an empty range.public final boolean isAutoVisibleRange()
public void setAutoVisibleRange(boolean auto)
Note: The bean property "autoVisibleRange" must not be specified together with the bean properties "visibleMin" or "visibleMax".
public final double getSpecifiedVisibleMin()
setVisibleMin(double)
public final double getSpecifiedVisibleMax()
setVisibleMax(double)
public void setVisibleRange(double min, double max)
setAutoVisibleRange(boolean)
public void setVisibleRange(IlvDataInterval range)
setAutoVisibleRange(boolean)
public void setVisibleMin(double min)
Note: The bean property "visibleMin" must not be specified together with the bean property "autoVisibleRange".
public void setVisibleMax(double max)
Note: The bean property "visibleMax" must not be specified together with the bean property "autoVisibleRange".
public void translateVisibleRange(double delta)
setVisibleRange(visibleMin+delta, visibleMax+delta)Indeed,
setVisibleRange
clips the new visible range
against the data range, whereas this method adapts the translation
amount before modifying the visible range.public final IlvAxisTransformer getTransformer()
public void setTransformer(IlvAxisTransformer transfo)
public final boolean isAdjusting()
setAdjusting(boolean)
public final void setAdjusting(boolean isAdjusting)
AxisEvent
events.
This lets the registered listeners know that the received notifications
are part of a set of changes.AxisEvent.isAdjusting()
public void addAxisListener(AxisListener listener)
public void removeAxisListener(AxisListener listener)
public String toString()
public void synchronizeWith(IlvAxis axis, boolean sync)
Note: This is a different synchronization mechanism
than the one used by the
IlvChart.synchronizeAxis(IlvChart, int, boolean)
method.
axis
- The target axis. Each axis will listen for modifications
made in the data range or the visible range of the other axis.sync
- Whether the axes are to be synchronized or unsynchronized.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.