public final class

ChartAxisScale

extends Object
java.lang.Object
   ↳ com.artfulbits.aiCharts.Base.ChartAxisScale

Class Overview

Represents the scaling class for superior ChartAxis.

Summary

Nested Classes
enum ChartAxisScale.IntervalType Represents type of interval used by ChartAxisScale
Constants
double MARGIN_INTERVAL
double MARGIN_NONE
double MARGIN_POINT
Public Methods
double coefficientToValue(double value)
Converts absolute portion of axis to ranged value.
boolean contains(double value)
Determines whether specified value falls into current visible range.
int getDesiredIntervalCount()
Gets desired axis intervals count.
Double getInterval()
Gets interval used by axis to represent its values.
ChartAxisScale.IntervalType getIntervalType()
Gets currently applied interval type.
double getMargin()
Gets value indicating whether axis' range will be calculated using margins.
double getRealMaximum()
Gets maximum value that is displayed by axis disregarding any zooming or scrolling.
double getRealMinimum()
Gets minimum value that is displayed by axis disregarding any zooming or scrolling.
double getRealSize()
Gets real scale size.
double getVisibleInterval()
Gets the visible interval for superior axis.
ChartAxisScale.IntervalType getVisibleIntervalType()
Gets visible interval type used by this axis scale.
double getVisibleMaximum()
Gets the visible maximum for superior axis.
double getVisibleMinimum()
Gets the visible minimum for superior axis.
double getVisibleSize()
Gets the visible scale size.
double getZoomPosition()
Gets current zoom position for parent axis.
double getZoomSize()
Gets current zoom size for parent axis.
boolean isInverted()
Indicates whether axis is inverted.
void mulZoom(double scale)
Zooms center of superior axis to specified scale.
void resetZoom()
Resets the zoom to initial value.
void scroll(double position)
This method is deprecated. setZoomPosition(double)
void setDateRange(Calendar startDate, Calendar endDate)
Limits axis displaying date range with a specified.
void setDateRange(Date startDate, Date endDate)
Limits axis displaying date range with a specified.
void setDesiredIntervalCount(int count)
Sets amount of desired intervals.
void setInterval(Double interval)
Sets interval used by axis to represent its values.
void setInterval(Double interval, ChartAxisScale.IntervalType intervalType)
Sets interval used by axis to represent its values.
void setIntervalType(ChartAxisScale.IntervalType intervalType)
Sets interval type that this scale should report to parent axis.
void setInverted(boolean inverted)
Indicates whether axis is inverted.
void setMargin(double margin)
Sets value indicating whether axis' range will be calculated using margins.
void setMaximum(Double max)
Sets maximum value of axis range.
void setMinimum(Double min)
Sets minimal value of axis range.
void setRange(double min, double max)
Limits axis displaying range with a specified.
void setZoom(double position, double size)
Zooms superior axis to specified size on current position.
void setZoomPosition(double position)
Scrolls superior axis to specified position.
double valueToCoefficient(double value)
Converts ranged axis value to absolute portion of axis.
void zoom(double size)
This method is deprecated. zoomToSize(double)
void zoom(double position, double size)
This method is deprecated. setZoom(double, double)
void zoomRange(double start, double end)
This method is deprecated. zoomToRange(double, double)
void zoomToFactor(double factor)
Zooms superior axis to specified factor (0...1).
void zoomToRange(double start, double end)
Zooms superior axis to specified range.
void zoomToSize(double size)
Zooms superior axis to specified size on current position.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final double MARGIN_INTERVAL

Constant Value: -1.0

public static final double MARGIN_NONE

Constant Value: 0.0

public static final double MARGIN_POINT

Constant Value: -2.0

Public Methods

public double coefficientToValue (double value)

Converts absolute portion of axis to ranged value.

Parameters
value absolute portion of axis.
Returns
  • ranged value.

public boolean contains (double value)

Determines whether specified value falls into current visible range.

Parameters
value target value.
Returns
  • true if visible interval contains specified value, otherwise false.

public int getDesiredIntervalCount ()

Gets desired axis intervals count.

Returns
  • number of desired intervals count.

public Double getInterval ()

Gets interval used by axis to represent its values.

Returns
  • value of axis interval.

public ChartAxisScale.IntervalType getIntervalType ()

Gets currently applied interval type.

Returns
  • value of axis interval.

public double getMargin ()

Gets value indicating whether axis' range will be calculated using margins.

Returns
  • reserved margin space or MARGIN_NONE, MARGIN_INTERVAL, MARGIN_POINT - used constants for identifying margin specific behavior.

public double getRealMaximum ()

Gets maximum value that is displayed by axis disregarding any zooming or scrolling.

Returns
  • maximum value

public double getRealMinimum ()

Gets minimum value that is displayed by axis disregarding any zooming or scrolling.

Returns
  • minimum value
See Also

public double getRealSize ()

Gets real scale size.

Returns
  • resulting size as difference between real boundaries.

public double getVisibleInterval ()

Gets the visible interval for superior axis.

Returns
  • visible interval.

public ChartAxisScale.IntervalType getVisibleIntervalType ()

Gets visible interval type used by this axis scale.

Returns
  • currently applied interval type.

public double getVisibleMaximum ()

Gets the visible maximum for superior axis.

Returns
  • visible maximum.

public double getVisibleMinimum ()

Gets the visible minimum for superior axis.

Returns
  • visible minimum.

public double getVisibleSize ()

Gets the visible scale size.

Returns
  • resulting size as difference between visible boundaries.

public double getZoomPosition ()

Gets current zoom position for parent axis.

Returns
  • current zoom position value.

public double getZoomSize ()

Gets current zoom size for parent axis.

Returns
  • current zoom size value.

public boolean isInverted ()

Indicates whether axis is inverted.

Returns
  • inverted is inverted.

public void mulZoom (double scale)

Zooms center of superior axis to specified scale.

Parameters
scale required scale.

public void resetZoom ()

Resets the zoom to initial value.

public void scroll (double position)

This method is deprecated.
setZoomPosition(double)

Scrolls superior axis to specified position.

Parameters
position required position.

public void setDateRange (Calendar startDate, Calendar endDate)

Limits axis displaying date range with a specified.

Parameters
startDate starting date value.
endDate ending date value.

public void setDateRange (Date startDate, Date endDate)

Limits axis displaying date range with a specified.

Parameters
startDate starting date value.
endDate ending date value.

public void setDesiredIntervalCount (int count)

Sets amount of desired intervals.

Parameters
count number of desired axis intervals.

public void setInterval (Double interval)

Sets interval used by axis to represent its values.

Parameters
interval value of desired interval.

public void setInterval (Double interval, ChartAxisScale.IntervalType intervalType)

Sets interval used by axis to represent its values.

Parameters
interval value of desired interval.
intervalType value of desired interval type.

public void setIntervalType (ChartAxisScale.IntervalType intervalType)

Sets interval type that this scale should report to parent axis.

Parameters
intervalType value of desired interval type.

public void setInverted (boolean inverted)

Indicates whether axis is inverted.

Parameters
inverted the inverted to set

public void setMargin (double margin)

Sets value indicating whether axis' range will be calculated using margins.

Parameters
margin margin value or MARGIN_NONE, MARGIN_INTERVAL, MARGIN_POINT.

public void setMaximum (Double max)

Sets maximum value of axis range. Set a null to enable auto calculation.

Parameters
max maximum value that is visible on axis.

public void setMinimum (Double min)

Sets minimal value of axis range. Set a null to enable auto calculation.

Parameters
min minimum value that is visible on axis.

public void setRange (double min, double max)

Limits axis displaying range with a specified.

Parameters
min minimum value that is visible on axis.
max maximum value that is visible on axis.

public void setZoom (double position, double size)

Zooms superior axis to specified size on current position.

Parameters
position start position of zoom.
size zoom size.

public void setZoomPosition (double position)

Scrolls superior axis to specified position.

Parameters
position required position.

public double valueToCoefficient (double value)

Converts ranged axis value to absolute portion of axis.

Parameters
value value related to axis range.
Returns
  • absolute portion value on axis.

public void zoom (double size)

This method is deprecated.
zoomToSize(double)

Zooms superior axis to specified size on current position.

Parameters
size zoom size.

public void zoom (double position, double size)

This method is deprecated.
setZoom(double, double)

Zooms and scrolls superior axis to specified size and position.

Parameters
position value of required position for axis.
size value of zoom required position for axis.

public void zoomRange (double start, double end)

This method is deprecated.
zoomToRange(double, double)

Zooms superior axis to specified range.

Parameters
start start value.
end end value.

public void zoomToFactor (double factor)

Zooms superior axis to specified factor (0...1).

Parameters
factor zoom factor for axis.

public void zoomToRange (double start, double end)

Zooms superior axis to specified range.

Parameters
start start value.
end end value.

public void zoomToSize (double size)

Zooms superior axis to specified size on current position.

Parameters
size zoom size.