Interface IAxis<T extends IAxisScalePolicy>
- Type Parameters:
T
- Subtypes may be more picky which scale policies the accept to disallow incorrect scales: This supports it (seesetAxisScalePolicy(IAxisScalePolicy)
).
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AAxis
,AAxisTransformation
,AxisInverse
,AxisLinear
,AxisLog10
,AxisLogE
Chart2D
.
- Version:
- $Revision: 1.39 $
- Author:
- Achim Westermann
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Represents a title of an axis. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The bean propertyconstant
identifying a change of the internal set of
instances.ITrace2D
static final String
The bean propertyconstant
identifying a change of the axis scale policy.static final String
Constant for a
of thePropertyChangeEvent
.IAxisTitlePainter
static final String
Constant for a
of the paint grid flag.PropertyChangeEvent
static final String
Constant for a
of the paint scale flag.PropertyChangeEvent
static final String
Constant for a
of the range policy.PropertyChangeEvent
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Add a listener for the given property.boolean
Adds a trace that belongs to this axis.Returns the accessor to the chart.int
Returns the constant for the position of this axis for the chart.Returns the axis scale policy which controls the position and distance of the ticks to draw.Returns the title of this axis.int
Returns the constant for the dimension this axis stands for in the chart.Returns the String constant for the dimension this axis stands for in the chart.Returns the formatter for labels.int
Returns the height in pixel this axis needs to paint itself.double
Get the major tick spacing for label generation.double
getMax()
Returns the maximum value from all traces of this axis with respect to the installed range policy.double
Returns the maximum value of all
instances in allTracePoint2D
instances in this axis regardless of the configuredITrace2D
(seeIRangePolicy
).setRangePolicy(IRangePolicy)
double
getMin()
Returns the minimum value of all traces of this axis with respect to the installed range policy.double
Get the minor tick spacing for label generation.double
Returns the minimum value of all
instances in allTracePoint2D
instances in this axis regardless of the configuredITrace2D
(seeIRangePolicy
).setRangePolicy(IRangePolicy)
int
Returns the left pixel of this axis coordinate in the graphic context of the current paint operation.int
Returns the right pixel coordinate of this axis in the graphic context of the current paint operation.int
Returns the bottom pixel coordinate of this axis in the graphic context of the current paint operation.int
Returns the top pixel coordinate of this axis in the graphic context of the current paint operation.getPropertyChangeListeners
(String propertyName) Returns an array of all the listeners that were added to the this instance withaddPropertyChangeListener(String, PropertyChangeListener)
.getRange()
Returns the range policy of this axis.double
getScaledValue
(double absolute) Scales the given absolute value into a value between 0 and 1.0 (if it is in the range of the data).getTitle()
Deprecated.Deprecated.this method might be dropped because the painter should be of no concern.int
Returns the width in pixel this axis needs to paint itself.boolean
Returns true if this axis is responsible for rendering the scale of the given trace (
was called on this instance with the given trace).addTrace(ITrace2D)
void
Allows to perform expensive calculations for various values that are used by many calls throughout a paint iterations.boolean
Returns true if the bounds in the given dimension of allTracePoint2D
instances of all internalITrace2D
instances have changed since all points have been normalized to a value between 0 and 1 or true if this axis has different range since the last call to
.scale()
boolean
Returns wether the x grid is painted or not.boolean
Returns whether the scale for this axis should be painted or not.boolean
Check wether scale values are started from major ticks.boolean
Check whether this axis is visible, i.e.void
Renders the axis line along with title, scale, scale labels and unit label.int
paintTitle
(Graphics g2d) Routine for painting the title of this axis.Convenience method for removing all contained
instances of this axis.ITrace2D
Removes the title of this axis.void
removePropertyChangeListener
(String property, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.boolean
removeTrace
(ITrace2D trace) Removes the given trace from this axis.void
scale()
Scales all
instances in the dimension represented by this axis.ITrace2D
void
scaleTrace
(ITrace2D trace) Scales the given
in the dimension represented by this axis.ITrace2D
setAxisScalePolicy
(T axisScalePolicy) Sets the axis scale policy which controls the position and distance of the ticks to draw.void
setAxisTitle
(IAxis.AxisTitle axisTitle) Sets the title of this axis.void
setFormatter
(IAxisLabelFormatter formatter) Sets the formatter to use for labels.void
setMajorTickSpacing
(double majorTickSpacing) This method sets the major tick spacing for label generation.void
setMinorTickSpacing
(double minorTickSpacing) This method sets the minor tick spacing for label generation.void
setPaintGrid
(boolean grid) Set wether the grid in this dimension should be painted or not.void
setPaintScale
(boolean show) Set if the scale for this axis should be shown.void
setPixelXLeft
(int pixel) Sets a Range to use for filtering the view to the the connected Axis.void
setPixelXRight
(int pixel) Sets the right pixel of this axis coordinate in the graphic context of the current paint operation.void
setPixelYBottom
(int pixel) Sets the bottom pixel of this axis coordinate in the graphic context of the current paint operation.void
setPixelYTop
(int pixel) Sets the top pixel of this axis coordinate in the graphic context of the current paint operation.void
Sets a Range to use for filtering the view to the the connected Axis.void
setRangePolicy
(IRangePolicy rangePolicy) Sets the RangePolicy.void
setStartMajorTick
(boolean majorTick) Set wether scale values are started from major ticks.Deprecated.usegetAxisTitle()
and on the resultIAxis.AxisTitle.setTitle(String)
setTitlePainter
(IAxisTitlePainter painter) Deprecated.usegetAxisTitle()
and on the resultIAxis.AxisTitle.setTitlePainter(IAxisTitlePainter)
.void
setVisible
(boolean visible) Show/hide this axis.double
translatePxToValue
(int pixel) Transforms the given pixel value (which has to be a awt value likeMouseEvent.getY()
into the chart value.int
translateValueToPx
(double value) Transforms the given chart data value into the corresponding awt pixel value for the chart.
-
Field Details
-
PROPERTY_ADD_REMOVE_TRACE
The bean propertyconstant
identifying a change of the internal set of
instances.ITrace2D
Use this constant to register a
PropertyChangeListener
with theIAxis
.See
addPropertyChangeListener(String, PropertyChangeListener)
for property change events fired.- See Also:
-
PROPERTY_AXIS_SCALE_POLICY_CHANGED
The bean propertyconstant
identifying a change of the axis scale policy.Use this constant to register a
PropertyChangeListener
with theIAxis
.See
addPropertyChangeListener(String, PropertyChangeListener)
for property change events fired.- See Also:
-
PROPERTY_LABELFORMATTER
Constant for a
of thePropertyChangeEvent
.IAxisTitlePainter
- See Also:
-
PROPERTY_PAINTGRID
Constant for a
of the paint grid flag.PropertyChangeEvent
- See Also:
-
PROPERTY_PAINTSCALE
Constant for a
of the paint scale flag.PropertyChangeEvent
- See Also:
-
PROPERTY_RANGEPOLICY
Constant for a
of the range policy.PropertyChangeEvent
- See Also:
-
-
Method Details
-
addPropertyChangeListener
Add a listener for the given property.The following
PropertyChangeEvent
types should be fired to listeners:
getPropertyName()
getSource()
getOldValue()
getNewValue()
PROPERTY_ADD_REMOVE_TRACE
that changedIAxis
null
- a new trace was added.
, the new trace.ITrace2D
PROPERTY_ADD_REMOVE_TRACE
that changedIAxis
, the old trace.ITrace2D
null
- the trace was removed.PROPERTY_RANGEPOLICY
that changedIAxis
, the old value.IRangePolicy
, the new value.IRangePolicy
PROPERTY_PAINTGRID
that changedIAxis
, the old value.Boolean
, the new value.Boolean
PROPERTY_LABELFORMATTER
that changedIAxis
, the old value or null if there was no formatter before.IAxisLabelFormatter
, the new value.IAxisLabelFormatter
PROPERTY_AXIS_SCALE_POLICY_CHANGED
that changedIAxis
, the old value.IAxisScalePolicy
, the new value.IAxisScalePolicy
- Parameters:
propertyName
- the property to be informed about changes.listener
- the listener that will be informed.
-
addTrace
Adds a trace that belongs to this axis.Adding a trace that is already contained may be problematic, so an exception should be raised in that case to warn you that your code is doing unnecessary to malicious operations.
- Parameters:
trace
- the trace to add.- Returns:
- true if the trace was added, false else.
-
getAccessor
AAxis<?>.AChart2DDataAccessor getAccessor()Returns the accessor to the chart.- Returns:
- the accessor to the chart.
-
getAxisPosition
int getAxisPosition()Returns the constant for the position of this axis for the chart.- Returns:
Chart2D.CHART_POSITION_LEFT
,Chart2D.CHART_POSITION_RIGHT
,Chart2D.CHART_POSITION_TOP
,Chart2D.CHART_POSITION_BOTTOM
or -1 if this axis is not assigned to a chart.
-
getAxisTitle
IAxis.AxisTitle getAxisTitle()Returns the title of this axis.- Returns:
- the axis title used.
-
removeAxisTitle
IAxis.AxisTitle removeAxisTitle()Removes the title of this axis.Prefer this method instead of
if you want to drop the axis title as this method also "unlistens" this axis from it's title.getAxisTitle()
- Returns:
- the removed title.
-
getDimension
int getDimension()Returns the constant for the dimension this axis stands for in the chart. -
getDimensionString
String getDimensionString()Returns the String constant for the dimension this axis stands for in the chart.- Returns:
- "X", "Y" or
null
if not assigned to a
.Chart2D
-
getFormatter
IAxisLabelFormatter getFormatter()Returns the formatter for labels.- Returns:
- the formatter for labels.
-
getHeight
Returns the height in pixel this axis needs to paint itself.This includes the axis line, it's ticks and labels and it's title.
Note:</br/> For an y axis the hight only includes the overhang it needs on the upper edge for painting a complete lable, not the complete space it needs for the complete line.
- Parameters:
g2d
- needed for font metric information.- Returns:
- the height in pixel this axis needs to paint itself.
-
getMajorTickSpacing
double getMajorTickSpacing()Get the major tick spacing for label generation.- Returns:
- the major tick spacing for label generation.
- See Also:
-
getMax
double getMax()Returns the maximum value from all traces of this axis with respect to the installed range policy.- Returns:
- the maximum value from all traces of this axis with respect to the installed range policy.
-
getMaxValue
double getMaxValue()Returns the maximum value of all
instances in allTracePoint2D
instances in this axis regardless of the configuredITrace2D
(seeIRangePolicy
). The returned value is either in x or y dimension - depending on the dimension this axis is working in for the chart.setRangePolicy(IRangePolicy)
- Returns:
- the maximum value of all
TracePoint2D
instances in this axis regardless of the configuredITrace2D
(seeIRangePolicy
).setRangePolicy(IRangePolicy)
-
getMin
double getMin()Returns the minimum value of all traces of this axis with respect to the installed range policy.- Returns:
- the minimum value of all traces of this axis with respect to the installed range policy.
-
getMinorTickSpacing
double getMinorTickSpacing()Get the minor tick spacing for label generation.- Returns:
- the minor tick spacing for label generation.
- See Also:
-
getMinValue
double getMinValue()Returns the minimum value of all
instances in allTracePoint2D
instances in this axis regardless of the configuredITrace2D
(seeIRangePolicy
). The returned value is either in x or y dimension - depending on the dimension this axis is working in for the chart.setRangePolicy(IRangePolicy)
- Returns:
- the minimum value of all
TracePoint2D
instances in this axis regardless of the configuredITrace2D
(seeIRangePolicy
).setRangePolicy(IRangePolicy)
-
getPixelXLeft
int getPixelXLeft()Returns the left pixel of this axis coordinate in the graphic context of the current paint operation.Note that this value is only valid throughout a
invocation.Chart2D.paint(java.awt.Graphics)
- Returns:
- the left pixel coordinate of this axis in the graphic context of the current paint operation.
-
getPixelXRight
int getPixelXRight()Returns the right pixel coordinate of this axis in the graphic context of the current paint operation.Note that this value is only valid throughout a
invocation.Chart2D.paint(java.awt.Graphics)
- Returns:
- the right pixel coordinate of this axis in the graphic context of the current paint operation.
-
getPixelYBottom
int getPixelYBottom()Returns the bottom pixel coordinate of this axis in the graphic context of the current paint operation.Note that this value is only valid throughout a
invocation.Chart2D.paint(java.awt.Graphics)
- Returns:
- the bottom pixel coordinate of this axis in the graphic context of the current paint operation.
-
getPixelYTop
int getPixelYTop()Returns the top pixel coordinate of this axis in the graphic context of the current paint operation.Note that this value is only valid throughout a
invocation.Chart2D.paint(java.awt.Graphics)
- Returns:
- the top pixel coordinate of this axis in the graphic context of the current paint operation.
-
getPropertyChangeListeners
Returns an array of all the listeners that were added to the this instance withaddPropertyChangeListener(String, PropertyChangeListener)
.- Parameters:
propertyName
- The name of the property being listened to.- Returns:
- an array of all the listeners that were added to the this instance
with
addPropertyChangeListener(String, PropertyChangeListener)
. - See Also:
-
getRange
Range getRange()Returns the range lasting from
togetMin()
.getMax()
This method is used by the Chart2D to scale it's values during painting.
Caution: This method does not necessarily return the Range configured with
setRange(Range)
. The internalIRangePolicy
is taken into account.- Returns:
- the range corresponding to the upper and lower bound of the values that will be displayable on this Axis of the Chart2D.
- See Also:
-
getRangePolicy
IRangePolicy getRangePolicy()Returns the range policy of this axis.- Returns:
- the range policy of this axis.
-
getScaledValue
double getScaledValue(double absolute) Scales the given absolute value into a value between 0 and 1.0 (if it is in the range of the data).If the given absolute value is not in the display- range of the
Chart2D
, negative values or values greater than 1.0 may result.- Parameters:
absolute
- a value in the real value range of the corresponding chart.- Returns:
- a value between 0.0 and 1.0 that is mapped to a position within the chart.
-
getAxisScalePolicy
IAxisScalePolicy getAxisScalePolicy()Returns the axis scale policy which controls the position and distance of the ticks to draw.- Returns:
- the axis scale policy which controls the position and distance of the ticks to draw.
-
setAxisScalePolicy
Sets the axis scale policy which controls the position and distance of the ticks to draw.- Parameters:
axisScalePolicy
- the axis scale policy which controls the position and distance of the ticks to draw to use.- Returns:
- the previous axis scale policy that was used before.
-
getTitle
Deprecated.usegetAxisTitle()
and on the resultIAxis.AxisTitle.getTitle()
.Returns the title ornull
if there was no title configured before.- Returns:
- the title or
null
if there was no title configured before. - See Also:
-
getTitlePainter
Deprecated.this method might be dropped because the painter should be of no concern.Returns the instance that will paint the title of this axis.- Returns:
- the instance that will paint the title of this axis.
-
getTraces
-
getWidth
Returns the width in pixel this axis needs to paint itself.This includes the axis line, it's ticks and labels and it's title.
Note:</br/> For an x axis the width only includes the overhang it needs on the right edge for painting a complete label, not the complete space it needs for the complete line.
- Parameters:
g2d
- needed for font metric information.- Returns:
- the width in pixel this axis needs to paint itself.
-
hasTrace
Returns true if this axis is responsible for rendering the scale of the given trace (
was called on this instance with the given trace).addTrace(ITrace2D)
- Parameters:
trace
- the trace to check for containment.- Returns:
- true if this axis is responsible for rendering the scale of the
given trace (
was called on this instance with the given trace).addTrace(ITrace2D)
-
initPaintIteration
void initPaintIteration()Allows to perform expensive calculations for various values that are used by many calls throughout a paint iterations.These values are constant throughout a paint iteration by the contract that no point is added removed or changed in this period. Because these values are used from many methods it is impossible to calculate them at a "transparent" method that may perform this caching over a paint period without knowledge from outside. The first method called in a paint iteration is called several further times in the iteration. So this is the common hook to invoke before painting a chart.
-
isDirtyScaling
boolean isDirtyScaling()Returns true if the bounds in the given dimension of allTracePoint2D
instances of all internalITrace2D
instances have changed since all points have been normalized to a value between 0 and 1 or true if this axis has different range since the last call to
.scale()
- Returns:
- true if the bounds in the given dimension of all
TracePoint2D
instances of all internalITrace2D
instances have changed since all points have been normalized to a value between 0 and 1 or true if this axis has different range since the last call toscale()
-
isPaintGrid
boolean isPaintGrid()Returns wether the x grid is painted or not.- Returns:
- wether the x grid is painted or not.
-
isPaintScale
boolean isPaintScale()Returns whether the scale for this axis should be painted or not.- Returns:
- whether the scale for this axis should be painted or not.
-
isStartMajorTick
boolean isStartMajorTick()Check wether scale values are started from major ticks.- Returns:
- true if scale values start from major ticks.
- See Also:
-
isVisible
boolean isVisible()Check whether this axis is visible, i.e. needs to be painted on the chart- Returns:
- the visibility state of this axis
-
paint
Renders the axis line along with title, scale, scale labels and unit label.This should only be called from
, all other uses may cause damaged UI or deadlocks.Chart2D
- Parameters:
g2d
- the graphics context to use.
-
paintTitle
Routine for painting the title of this axis.Intended for
only!!!Chart2D
- Parameters:
g2d
- needed for painting.- Returns:
- the width consumed in pixel for y axis, the height consumed in pixel for x axis.
-
removeAllTraces
Convenience method for removing all contained
instances of this axis.ITrace2D
Implementations should fire a
for thePropertyChangeEvent
PropertyChangeEvent.getPropertyName()
for every single trace removed. This is done best by delegating this call to several calls toPROPERTY_ADD_REMOVE_TRACE
.removeTrace(ITrace2D)
- Returns:
- a shallow copy of the set of traces that were contained before.
-
removePropertyChangeListener
Remove a PropertyChangeListener for a specific property. Iflistener
was added more than once to the same event source for the specified property, it will be notified one less time after being removed. IfpropertyName
is null, no exception is thrown and no action is taken. Iflistener
is null, or was never added for the specified property, no exception is thrown and no action is taken.- Parameters:
property
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed.- See Also:
-
removeTrace
Removes the given trace from this axis.A
for thePropertyChangeEvent
PropertyChangeEvent.getPropertyName()
has to be fired on the registeredPROPERTY_ADD_REMOVE_TRACE
for the trace removed.PropertyChangeListener
- Parameters:
trace
- the trace to remove from this axis.- Returns:
- true if the given trace could be removed from this axis, false else.
-
scale
void scale() -
scaleTrace
Scales the given
in the dimension represented by this axis.ITrace2D
This method is not deadlock - safe and should be called by the
only!Chart2D
- Parameters:
trace
- the trace to scale.
-
setAxisTitle
Sets the title of this axis.- Parameters:
axisTitle
- the axis title to use.
-
setFormatter
Sets the formatter to use for labels.- Parameters:
formatter
- The formatter to set.
-
setMajorTickSpacing
void setMajorTickSpacing(double majorTickSpacing) This method sets the major tick spacing for label generation.Only values between 0.0 and 100.0 are allowed.
The number that is passed in represents the distance, measured in values, between each major tick mark. If you have a trace with a range from 0 to 50 and the major tick spacing is set to 10, you will get major ticks next to the following values: 0, 10, 20, 30, 40, 50.
Note:
Ticks are free of any multiples of 1000. If the chart contains values between 0 an 1000 and configured a tick of 2 the values 0, 200, 400, 600, 800 and 1000 will highly probable to be displayed. This depends on the size (in pixels) of theChart2D<
. Of course there is a difference: ticks are used in divisions and multiplications: If the internal values are very low and the ticks are very high, huge rounding errors might occur (division by ticks results in very low values a double cannot hit exactly. So prefer setting ticks between 0 an 10 or - if you know your values are very small (e.g. in nano range [10 -9 ]) use a small value (e.g. 2*10 -9 ).- Parameters:
majorTickSpacing
- the major tick spacing for label generation.
-
setMinorTickSpacing
void setMinorTickSpacing(double minorTickSpacing) This method sets the minor tick spacing for label generation.The number that is passed-in represents the distance, measured in values, between each minor tick mark. If you have a trace with a range from 0 to 10 and the minor tick spacing is set to 2, you will get major ticks next to the following values: 0, 2, 4, 6, 8, 10. If a major tick hits the same values the tick will be a major ticks. For this example: if a major tick spacing is set to 5 you will only get minor ticks for: 2, 4, 6, 8.
Note:
Ticks are free of any powers of 10. There is no difference between setting a tick to 2, 200 or 20000 because ticks cannot break the rule that every scale label has to be visible. If the chart contains values between 0 an 1000 and configured a tick of 2 the values 0, 200, 400, 600, 800 and 1000 will highly probable to be displayed. This depends on the size (in pixels) of theChart2D<
. Of course there is a difference: ticks are used in divisions and multiplications: If the internal values are very low and the ticks are very high, huge rounding errors might occur (division by ticks results in very low values a double cannot hit exactly. So prefer setting ticks between 0 an 10 or - if you know your values are very small (e.g. in nano range [10 -9 ]) use a small value (e.g. 2*10 -9 ).- Parameters:
minorTickSpacing
- the minor tick spacing to set.
-
setPaintGrid
void setPaintGrid(boolean grid) Set wether the grid in this dimension should be painted or not.A repaint operation for the chart is triggered.
- Parameters:
grid
- true if the grid should be painted or false if not.
-
setPaintScale
void setPaintScale(boolean show) Set if the scale for this axis should be shown.- Parameters:
show
- true if the scale on this axis should be shown, false else.
-
setPixelXLeft
void setPixelXLeft(int pixel) Sets a Range to use for filtering the view to the the connected Axis. Note that it's effect will be affected by the internalIRangePolicy
.This must only be called from the
itself!Chart2D
- Parameters:
pixel
- the left pixel coordinate of this axis in the graphic context of the current paint operation.
-
setPixelXRight
void setPixelXRight(int pixel) Sets the right pixel of this axis coordinate in the graphic context of the current paint operation.This must only be called from the
itself!Chart2D
- Parameters:
pixel
- the right pixel coordinate of this axis in the graphic context of the current paint operation.
-
setPixelYBottom
void setPixelYBottom(int pixel) Sets the bottom pixel of this axis coordinate in the graphic context of the current paint operation.This must only be called from the
itself!Chart2D
- Parameters:
pixel
- the bottom pixel coordinate of this axis in the graphic context of the current paint operation.
-
setPixelYTop
void setPixelYTop(int pixel) Sets the top pixel of this axis coordinate in the graphic context of the current paint operation.This must only be called from the
itself!Chart2D
- Parameters:
pixel
- the top pixel coordinate of this axis in the graphic context of the current paint operation.
-
setRange
Sets a Range to use for filtering the view to the the connected Axis. Note that it's effect will be affected by the internalIRangePolicy
.To get full control use:
setRangePolicy(new <AnARangePolicy>(range);
- Parameters:
range
- Range to use for filtering the view to the the connected Axis.- See Also:
-
setRangePolicy
Sets the RangePolicy.If the given RangePolicy has an unconfigured internal Range (
Range.RANGE_UNBOUNDED
) the old internal RangePolicy is taken into account:
If the old RangePolicy has a configured Range this is transferred to the new RangePolicy.- Parameters:
rangePolicy
- The rangePolicy to set.
-
setStartMajorTick
void setStartMajorTick(boolean majorTick) Set wether scale values are started from major ticks.- Parameters:
majorTick
- true if scale values shall start with a major tick.- See Also:
-
setTitle
Deprecated.usegetAxisTitle()
and on the resultIAxis.AxisTitle.setTitle(String)
Sets the title of this axis will be painted by the{IAxisTitlePainter}
of this instance.- Parameters:
title
- the title to set.- Returns:
- the previous Title or
null
if there was no title configured before. - See Also:
-
setTitlePainter
Deprecated.usegetAxisTitle()
and on the resultIAxis.AxisTitle.setTitlePainter(IAxisTitlePainter)
.Sets the title painter that will paint the title of this axis.- Parameters:
painter
- the instance that will paint the title of this axis.- Returns:
- the previous title painter of this axis or null if there was none configured before.
-
setVisible
void setVisible(boolean visible) Show/hide this axis.- Parameters:
visible
- true to paint axis, false to hide.
-
translatePxToValue
double translatePxToValue(int pixel) Transforms the given pixel value (which has to be a awt value likeMouseEvent.getY()
into the chart value.Internal use only, the interface does not guarantee that the pixel corresponds to any valid awt pixel value within the chart component.
- Parameters:
pixel
- a pixel value of the chart component as used by awt.- Returns:
- the awt pixel value transformed to the chart value.
-
translateValueToPx
int translateValueToPx(double value) Transforms the given chart data value into the corresponding awt pixel value for the chart.- Parameters:
value
- a chart data value.- Returns:
- the awt pixel value corresponding to the chart data value.
-
getAxisTitle()
and on the resultIAxis.AxisTitle.getTitle()
.