com.steema.teechart.axis
Class Axis

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.axis.Axis
Direct Known Subclasses:
DepthAxis

public class Axis
extends TeeBase

Title: Axis class

Description: Accesses all Axis characteristics

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Field Summary
protected  AxisCalcResolver axisCalcResolver
           
static int AXISCLICKGAP
           
 AxisDraw axisDraw
           
protected  AxisLinePen axispen
           
protected  AxisTitle axisTitle
           
protected  boolean bVisible
           
protected  GridPen grid
           
 boolean hideBackGrid
           
 boolean hideSideGrid
           
protected  boolean horizontal
           
protected  boolean iAxisDateTime
           
 int iAxisSize
           
 int iEndPos
           
 int iGapSize
           
protected  boolean inverted
           
 boolean iRangezero
           
 boolean isDepthAxis
           
 int iStartPos
           
 int iZPos
           
static int MAXPIXELPOS
           
static double MINAXISRANGE
           
protected  ChartPen minorGrid
           
protected  boolean useMaxPixelPos
           
protected  double zPosition
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
Axis()
           
Axis(boolean horiz, boolean isOtherSide, IBaseChart chart)
           
Axis(IBaseChart chart)
           
 
Method Summary
 void adjustMaxMin()
          Calculates Maximum and Minimum values based on Max and Min values of the dependent Series.
 void adjustMaxMinRect(int rLeft, int rTop, int rRight, int rBottom)
          Called internally to recalculate the max and min values using the Rect parameter positions.
protected  void calcAllSeries()
           
 double calcIncrement()
          Returns the calculated Axis Label increment and serves as a useable measure when Labelling is set to manual or automatic increments.
 AxisLabelStyle calcLabelStyle()
          Returns the most logical Axis Label style.
 void calcMinMax(FloatRange tmp)
          Returns the minimum and maximum values of the associated Series.
 double calcPosPoint(int value)
           
 int calcPosValue(double value)
          Returns the corresponding value of a Screen position in pixels.
 Rectangle calcRect(Rectangle r, boolean inflateChartRectangle)
          Used internally by Chart when creating Axes
 void calcRoundScales()
          Rounds Axis scale to integer values
 int calcSizeValue(double value)
          Returns the amount in pixels that corresponds to a portion of the axis of size "Value" in axis scales.
 int calcXPosValue(double value)
          Calculates the Horizontal coordinate in pixels of Value parameter.
 double calcXYIncrement(int maxLabelSize)
          Returns the calculated Axis Label increment.
 int calcYPosValue(double value)
          Calculates the Vertical coordinate in pixels of Value parameter.
 int calcZPos()
          Calculates the Vertical coordinate in pixels of Value parameter
 void checkNextLabelValue(Axis axis, AxisLabelValueEventArgs e)
           
 boolean clicked(int x, int y)
          Returns if X and Y coordinates are close to the Axis position.
 boolean clicked(Point xy)
          Returns if X and Y coordinates are close to the Axis position.
 net.rim.device.api.i18n.DateFormat dateTimeDefaultFormat(double astep)
          Returns either a Time or Date format depending if the astep parameter is lower than one day (time) or greater (date).
 double dateTimeIncrement(boolean isDateTime, boolean increment, double value, double anIncrement, int tmpWhichDatetime)
          Is a set of constants used to specify a date time increment.
 void draw(boolean calcPosAxis)
          Displays an Axis at the specified screen positions with the current axis scales.
 void draw(IGraphics3D g, boolean calcPosAxis)
          Displays an Axis at the specified screen positions with the current
axis scales.
 void draw(int posLabels, int posTitle, int posAxis, boolean gridVisible)
          Displays an Axis at the specified screen positions with the current axis scales.
 void draw(int posLabels, int posTitle, int posAxis, boolean gridVisible, double aMinimum, double aMaximum, double aIncrement, int aStartPos, int aEndPos)
          Displays an Axis at the specified screen positions with the current axis scales.
 void draw(int posLabels, int posTitle, int posAxis, boolean gridVisible, double aMinimum, double aMaximum, int aStartPosition, int aEndPosition)
          Displays an Axis at the specified screen positions with the current axis scales.
 void draw(int posLabels, int posTitle, int posAxis, boolean gridVisible, int aStartPos, int aEndPos)
          Displays an Axis at the specified screen positions with the current axis scales.
 void drawAxisLabel(ChartFont f, int x, int y, int angle, java.lang.String st, TextShape format)
          Draws Axis Label (String) in font f at specified X,Y co-ordinate at Angle.
 void drawAxisLabel(int x, int y, int angle, java.lang.String st, TextShape labelItem)
          Draws Axis Label (String) at specified X,Y co-ordinate at Angle.
 void drawLineSegment(int aStart, int aEnd)
           
 void drawTitle(int x, int y)
          TeeChart internal use.
static int findDateTimeStep(double stepValue)
          Used internally to return Axis Datetime step.
 boolean getAutomatic()
          Calculates Max and Min of axis scale based on associated Series.
 boolean getAutomaticMaximum()
          Controls if Axis will adjust the Maximum value automatically based on the maximum value of its associated Series.
 boolean getAutomaticMinimum()
          Controls minimum value automatically based on the minimum value of its associated Series.
 AxisCalcResolver getAxisCalcResolver()
           
 AxisLinePen getAxisPen()
          Determines the kind of pen used to draw the major Axis lines.
 double getCalcIncrement()
          Returns the calculated Axis Label increment and serves as a useable measure when Labelling is set to manual or automatic increments.
 AxisLabelsItems getCustomLabels()
          Returns the custom labels
protected  StringAlignment getDepthAxisAlign()
           
 double getEndPosition()
          Axis End Position on its own Axis expressed as a percentage (0-100%).
 GridPen getGrid()
          Determines the kind of pen used to draw the Grid lines at every Axis Label position.
 boolean getGridCentered()
          Obsolete.
 boolean getHorizontal()
          Determines the Custom axis to be drawn horizontally.
 double getIncrement()
          Determines the minimum step between axis labels.
 int getInflateAxisPos(int value, int amount)
           
 boolean getInverted()
          Swaps the Axis Minimum and Maximum scales.
 boolean getIsDepthAxis()
          Returns whether this is Depth Axis
 AxisLabels getLabels()
          Accesses the Label characteristics of Axis Labels.
 boolean getLabelsOnAxis()
          Obsolete.
 boolean getLogarithmic()
          Scales the Axis Logarithmically when true.
 double getLogarithmicBase()
          The base for the Logarithmic scale when Axis Logarithmic = true.
 double getMaximum()
          The highest value an Axis will use to scale their dependent Series point values.
 int getMaximumOffset()
          Amount of pixels that will be left as a margin at axis maximum position.
 boolean getMaxRound()
          Defines the maximum value for the axis scales to round to when True
 double getMaxXValue()
          Returns the calculated Maximum Horizontal value for the specified AAxis.
 double getMaxYValue()
          Returns the calculated Maximum Vertical value for the specified AAxis.
 double getMinAxisIncrement()
          Advanced use.
 double getMinimum()
          The lowest value an Axis will use to scale their dependent Series point values.
 int getMinimumOffset()
          The number of pixels that will be left as a margin at axis minimum position.
 ChartPen getMinorGrid()
          Characteristics of the Grid coincidental to Minor Ticks.
 int getMinorTickCount()
          The number of Axis minor ticks between major ticks.
 TicksPen getMinorTicks()
          Determines the Pen used to draw the Axis Minor ticks.
 boolean getMinRound()
          Defines the minimum value for the axis scales to round to when True
 double getMinXValue()
          Returns the calculated Minimum Horizontal value for the specified AAxis.
 double getMinYValue()
          Returns the calculted Minimum Vertical value for the specified AAxis.
 boolean getOtherSide()
          Positions the Axis labels to the Otherside of the axis.
 Axis getPartnerAxis()
           
 int getPosAxis()
          Obsolete.
 int getPosition()
          Determines the screen co-ordinate where axis is drawn.
 PositionUnits getPositionUnits()
          Defines axis Position units (pixels or percentage).
 double getRange()
          internal use.
 double getRelativePosition()
          Determines the Axis position as percentage 0-100% of the Chart.
 int getSizeLabels()
          Returns size (height perpendicular to its Axis) occupied by a Label.
 int getSizeTickAxis()
          Returns the greater of lengths of Ticks or MinorTicks
 double getStartPosition()
          Axis Start position on its own Axis expressed as a percentage.
 boolean getTickOnLabelsOnly()
          The Axis Ticks and Axis Grid to be drawn only coincide at Labels.
 TicksPen getTicks()
          Determines the kind of Pen used to draw Axis marks along the Axis line.
 TicksPen getTicksInner()
          Determines the kind of Pen used to draw Axis marks along the Axis line.
 AxisTitle getTitle()
          An Axis sub-class used to define Title attributes.
 int getTitleSize()
          Obsolete.
 boolean getUseMaxPixelPos()
           
 boolean getUsePartnerAxis()
           
 boolean getVisible()
          Shows or hides the Axis lines, ticks, grids, labels and title.
 double getZPosition()
          Determines the Z axis position along chart Depth as a percentage of the total depth.
protected  double incDecDateTime(boolean increment, double value, double anIncrement, int tmpWhichDatetime)
           
 int inflateAxisPos(int value, int amount)
           
 int internalCalcDepthPosValue(double value)
           
 int internalCalcLogPosValue(boolean isx, double value)
           
protected  void internalCalcPositions()
           
 double internalCalcPosPoint(int value)
          Returns the corresponding value of a Screen position.
 void internalCalcRange()
          Internal use.
 void internalSetInverted(boolean value)
          Intrnal use.
 boolean isCustom()
          Returns true if Axis is a Custom Axis
 boolean isDateTime()
          Returns if the Axis dependent values are DateTime or not.
 int maxLabelsWidth()
          Returns the maximum width in pixels of all Axis Labels.
protected  java.lang.Object readResolve()
           
 void removeAxisCalcResolver()
           
 void scroll(double offset, boolean checkLimits)
          Scrolls or displaces the Axis Maximum and Minimum values by the Offset parameter.
 void setAutomatic(boolean value)
          Max and Min of axis scale based on associated Series.
 void setAutomaticMaximum(boolean value)
          The Axis adjusts the Maximum value automatically based on the maximum value of its associated Series when true.
 void setAutomaticMinimum(boolean value)
          The Axis adjusts the Minimum value automatically based on the maximum value of its associated Series when true.
 int setAxisCalcPosValueDelegate(double value)
           
 void setAxisCalcResolver(AxisCalcResolver resolver)
           
 int setAxisCalcXPosValueDelegate(double value)
           
 int setAxisCalcYPosValueDelegate(double value)
           
 void setCalcPosValue()
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setEndPosition(double value)
          Sets the Axis End Position on its own Axis expressed as a percentage.
 void setGridCentered(boolean value)
          Obsolete.
 void setHorizontal(boolean value)
          Sets a custom axis to be drawn horizontally.
 void setIncrement(double value)
          Sets the minimum step between axis labels.
 void setInverted(boolean value)
          Swaps the Axis Minimum and Maximum scales when true.
 void setLabelsOnAxis(boolean value)
          Obsolete.
 void setLogarithmic(boolean value)
          Scales the Axis Logarithmically when true.
 void setLogarithmicBase(double value)
          Sets the base for the Logarithmic scale when Axis Logarithmic = true.
 void setMaximum(double value)
          Sets the highest value an Axis will use to scale their dependent Series point values.
 void setMaximumOffset(int value)
          Sets the amount of pixels that will be left as a margin at axis maximum position.
 void setMaxRound(boolean value)
          Sets the maximum value for the axis scales to round to when True
 void setMinAxisIncrement(double value)
          Advanced use.
 void setMinimum(double value)
          Sets the lowest value an Axis will use to scale their dependent Series point values.
 void setMinimumOffset(int value)
          Determines the number of pixels that will be left as a margin at axis minimum position.
 void setMinMax(DateTime minDate, DateTime maxDate)
          Changes the current Axis Minimum and Maximum scales.
 void setMinMax(double min, double max)
          Changes the current Axis Minimum and Maximum scales.
 void setMinorTickCount(int value)
          Determines the number of Axis minor ticks between major ticks.
 void setMinorTicks(TicksPen value)
          Determines the Pen used to draw the Axis Minor ticks.
 void setMinRound(boolean value)
          Sets the minimum value for the axis scales to round to when True
 void setOtherSide(boolean value)
          Sets the Axis labels to the Otherside of the axis.
 void setPartnerAxis(Axis value)
           
 void setPositionUnits(PositionUnits value)
          Determines the axis Position units (pixels or percentage).
 void setPosTitle(int value)
          Internal use.
 void setRelativePosition(double value)
          Determines the Axis position as percentage 0-100% of the Chart.
 void setStartPosition(double value)
          Sets the Axis Start position on its own Axis expressed as a percentage.
 void setTickOnLabelsOnly(boolean value)
          Sets the Axis Ticks and Axis Grid to be drawn to only coincide at Labels.
 void setTicks(TicksPen value)
          Accesses the Ticks characteristics.
 void setTitle(AxisTitle value)
          Accesses the Axis Title characteristics.
 void setTitleSize(int value)
          Obsolete.
 void setUseMaxPixelPos(boolean value)
           
 void setUsePartnerAxis(boolean value)
           
 void setVisible(boolean value)
          Shows the Axis lines, ticks, grids, labels and title when true.
 void setZPosition(double value)
          Sets the Z axis position along chart Depth as a percentage of the total depth.
protected  boolean shouldSerializeHorizontal()
           
protected  boolean shouldSerializeMaximum()
           
protected  boolean shouldSerializeMinimum()
           
protected  boolean shouldSerializeOtherSide()
           
protected  boolean shouldSerializeZPosition()
           
 java.lang.String titleOrName()
          Returns the Title or the Name of the Axis depending on whether you've
set a title or not.
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iGapSize

public int iGapSize

axisDraw

public transient AxisDraw axisDraw

MINAXISRANGE

public static final double MINAXISRANGE
See Also:
Constant Field Values

MAXPIXELPOS

public static final int MAXPIXELPOS
See Also:
Constant Field Values

useMaxPixelPos

protected boolean useMaxPixelPos

axispen

protected AxisLinePen axispen

axisTitle

protected AxisTitle axisTitle

grid

protected GridPen grid

hideBackGrid

public transient boolean hideBackGrid

hideSideGrid

public transient boolean hideSideGrid

minorGrid

protected ChartPen minorGrid

inverted

protected boolean inverted

horizontal

protected boolean horizontal

bVisible

protected boolean bVisible

zPosition

protected double zPosition

iAxisDateTime

protected transient boolean iAxisDateTime

iRangezero

public transient boolean iRangezero

iStartPos

public transient int iStartPos

iEndPos

public transient int iEndPos

iAxisSize

public transient int iAxisSize

isDepthAxis

public transient boolean isDepthAxis

iZPos

public transient int iZPos

AXISCLICKGAP

public static final int AXISCLICKGAP
See Also:
Constant Field Values

axisCalcResolver

protected transient AxisCalcResolver axisCalcResolver
Constructor Detail

Axis

public Axis()

Axis

public Axis(IBaseChart chart)

Axis

public Axis(boolean horiz,
            boolean isOtherSide,
            IBaseChart chart)
Method Detail

internalSetInverted

public void internalSetInverted(boolean value)
Intrnal use. Inverts scaling direction of Axis.

Parameters:
value -

readResolve

protected java.lang.Object readResolve()

setAxisCalcResolver

public void setAxisCalcResolver(AxisCalcResolver resolver)

removeAxisCalcResolver

public void removeAxisCalcResolver()

getAxisCalcResolver

public AxisCalcResolver getAxisCalcResolver()

getUseMaxPixelPos

public boolean getUseMaxPixelPos()

setUseMaxPixelPos

public void setUseMaxPixelPos(boolean value)

setAxisCalcXPosValueDelegate

public int setAxisCalcXPosValueDelegate(double value)

setAxisCalcYPosValueDelegate

public int setAxisCalcYPosValueDelegate(double value)

setAxisCalcPosValueDelegate

public int setAxisCalcPosValueDelegate(double value)

setCalcPosValue

public void setCalcPosValue()

getRange

public double getRange()
internal use. Returns Axis Max-Min range

Returns:

getLabels

public AxisLabels getLabels()
Accesses the Label characteristics of Axis Labels.

Returns:
AxisLabels

getCustomLabels

public AxisLabelsItems getCustomLabels()
Returns the custom labels

Returns:
AxisLabelsItems

getAutomatic

public boolean getAutomatic()
Calculates Max and Min of axis scale based on associated Series.

Returns:
boolean

setAutomatic

public void setAutomatic(boolean value)
Max and Min of axis scale based on associated Series.

Parameters:
value - boolean

shouldSerializeHorizontal

protected boolean shouldSerializeHorizontal()

getHorizontal

public boolean getHorizontal()
Determines the Custom axis to be drawn horizontally.

Returns:
boolean

setHorizontal

public void setHorizontal(boolean value)
Sets a custom axis to be drawn horizontally.

Parameters:
value - boolean

shouldSerializeOtherSide

protected boolean shouldSerializeOtherSide()

getOtherSide

public boolean getOtherSide()
Positions the Axis labels to the Otherside of the axis.
For instance, moves labels on a vertical Axis to the right of the Axis. This is useful when adding a Custom Axis, to place the labelling to the Right for a right vertical Axis, or to the Top for a Top Axis.

Returns:
boolean

setOtherSide

public void setOtherSide(boolean value)
Sets the Axis labels to the Otherside of the axis.

Parameters:
value - boolean

internalCalcRange

public void internalCalcRange()
Internal use.


adjustMaxMinRect

public void adjustMaxMinRect(int rLeft,
                             int rTop,
                             int rRight,
                             int rBottom)
Called internally to recalculate the max and min values using the Rect parameter positions.
The Rect parameter determines in pixels the margins to apply to ChartRect. The Axis recalculates the appropiate maximum and minimum values using the Rect parameter positions.

Parameters:
rect - Rectangle

isCustom

public boolean isCustom()
Returns true if Axis is a Custom Axis

Returns:
boolean

adjustMaxMin

public void adjustMaxMin()
Calculates Maximum and Minimum values based on Max and Min values of the dependent Series.
AdjustMaxMin is automatically called if Axis.Automatic is true. The Chart Zoom.Undo method calls AdjustMaxMin for Left, Right,Top and Bottom axis.


getAutomaticMaximum

public boolean getAutomaticMaximum()
Controls if Axis will adjust the Maximum value automatically based on the maximum value of its associated Series.
Default value: true

Returns:
boolean

setAutomaticMaximum

public void setAutomaticMaximum(boolean value)
The Axis adjusts the Maximum value automatically based on the maximum value of its associated Series when true.
Default value: true

Parameters:
value - boolean

getAutomaticMinimum

public boolean getAutomaticMinimum()
Controls minimum value automatically based on the minimum value of its associated Series.
Default value: true

Returns:
boolean

setAutomaticMinimum

public void setAutomaticMinimum(boolean value)
The Axis adjusts the Minimum value automatically based on the maximum value of its associated Series when true.
Default value: true

Parameters:
value - boolean

getAxisPen

public AxisLinePen getAxisPen()
Determines the kind of pen used to draw the major Axis lines.
These are the lines which go from Axis Minimum to Axis Maximum screen positions.

Returns:
AxisLinePen

getGrid

public GridPen getGrid()
Determines the kind of pen used to draw the Grid lines at every Axis Label position.
These are the lines which go from "cousin Axis" Minimum to "cousin Axis" Maximum screen positions for each Label position.
Use the MinorGrid property to make the Grid from Minor Ticks visible.

Returns:
GridPen

getLabelsOnAxis

public boolean getLabelsOnAxis()
Obsolete. Please use Labels.OnAxis instead.

Returns:
boolean

setLabelsOnAxis

public void setLabelsOnAxis(boolean value)
Obsolete. Please use Labels.OnAxis instead.

Parameters:
value - boolean

isDateTime

public boolean isDateTime()
Returns if the Axis dependent values are DateTime or not.
Each Chart Axis can consider values to be normal numbers or DateTime values. An axis is "DateTime" if at least one Active Series with datetime values is associated to it.
Default value: false

Returns:
boolean

getIncrement

public double getIncrement()
Determines the minimum step between axis labels.
Can use DateTimeStep for date-time axis. It must be a positive number or DateTime value. TChart will use this value as the inicial axis label step. If there is not enough space for all labels, TChart will calculate a bigger one. You can use the DateTimeStep constant array for DateTime increments.

Returns:
double

setIncrement

public void setIncrement(double value)
Sets the minimum step between axis labels.

Parameters:
value - double

getInverted

public boolean getInverted()
Swaps the Axis Minimum and Maximum scales.
When true, Axis Minimum and Maximum scales will be swapped. Axis labels and Series points will be displayed accordingly. This applies both to vertical and horizontal axis.
Default value: false

Returns:
boolean

setInverted

public void setInverted(boolean value)
Swaps the Axis Minimum and Maximum scales when true.
Default value: false

Parameters:
value - boolean

getLogarithmic

public boolean getLogarithmic()
Scales the Axis Logarithmically when true.
Axis Minimum and Maximum values should be greater than 0, and Axis cannot be of DateTime type.
Default value: false

Returns:
boolean

getIsDepthAxis

public boolean getIsDepthAxis()
Returns whether this is Depth Axis


setLogarithmic

public void setLogarithmic(boolean value)
                    throws ChartException
Scales the Axis Logarithmically when true.
Default value: false

Parameters:
value - boolean
Throws:
TeeChartException
ChartException

shouldSerializeMaximum

protected boolean shouldSerializeMaximum()

getMaximumOffset

public int getMaximumOffset()
Amount of pixels that will be left as a margin at axis maximum position.
It is useful when you don't want the series to display points very close to axis boundaries.
Default value: 0

Example:

 myChart.getAxes().getBottom().setMaximumOffset(4);
 myChart.getAxes().getBottom().setMinimumOffset(4);
 

Returns:
int

setMaximumOffset

public void setMaximumOffset(int value)
Sets the amount of pixels that will be left as a margin at axis maximum position.
Default value: 0

Parameters:
value - int

getMaximum

public double getMaximum()
The highest value an Axis will use to scale their dependent Series point values.
It can be any number or DateTime value. It must be greater than the Axis.Minimum value.

VERY IMPORTANT:
Axis.Automatic property must be FALSE. If Axis.Automatic is true, the Axis will set Maximum and Minimum values to Maximum and Minimum dependent Series values.

Returns:
double

setMaximum

public void setMaximum(double value)
Sets the highest value an Axis will use to scale their dependent Series point values.

Parameters:
value - double

shouldSerializeMinimum

protected boolean shouldSerializeMinimum()

getMinAxisIncrement

public double getMinAxisIncrement()
Advanced use. Smallest Axis calculation increment.
Default value: 1e-12

Returns:
double

setMinAxisIncrement

public void setMinAxisIncrement(double value)
Advanced use. Determines the smallest Axis calculation increment.
Default value: 1e-12

Parameters:
value - double

getMinimum

public double getMinimum()
The lowest value an Axis will use to scale their dependent Series point values.
It can be any number or DateTime value. It must be lower than the Axis.Maximum value.

VERY IMPORTANT:
Axis.Automatic property must be FALSE. If Axis.Automatic is true, the Axis will set Maximum and Minimum values to Maximum and Minimum dependent Series values.

Returns:
double

setMinimum

public void setMinimum(double value)
Sets the lowest value an Axis will use to scale their dependent Series point values.

Parameters:
value - double

getMinimumOffset

public int getMinimumOffset()
The number of pixels that will be left as a margin at axis minimum position.
It is useful when you don't want the series to display points very close to axis boundaries.
Default value: 0

Returns:
int

setMinimumOffset

public void setMinimumOffset(int value)
Determines the number of pixels that will be left as a margin at axis minimum position.
Default value: 0

Parameters:
value - int

getMinorTickCount

public int getMinorTickCount()
The number of Axis minor ticks between major ticks.
Axis minor ticks are the Axis sub-ticks between major ticks. It should be a positive number greater than zero and less than half the number of pixels between major ticks, otherwise Minor ticks will "overlap".
Default value: 3

Returns:
int

setMinorTickCount

public void setMinorTickCount(int value)
Determines the number of Axis minor ticks between major ticks.
Default value: 3

Parameters:
value - int

getMinorTicks

public TicksPen getMinorTicks()
Determines the Pen used to draw the Axis Minor ticks.
Minor ticks will only be displayed if MinorTicks.Visible is true.

Returns:
TicksPen

setMinorTicks

public void setMinorTicks(TicksPen value)
Determines the Pen used to draw the Axis Minor ticks.
Minor ticks will only be displayed if MinorTicks.Visible is true.

Parameters:
value - TicksPen

getPosAxis

public int getPosAxis()
Obsolete. Please use Position instead.

Returns:
int

getPosition

public int getPosition()
Determines the screen co-ordinate where axis is drawn.
It returns the position of the Axis in pixels relative to the Chart Panel. For horizontal axes the number is a Y position, for vertical axes an X position.
Default value: 0

Returns:
int

getTickOnLabelsOnly

public boolean getTickOnLabelsOnly()
The Axis Ticks and Axis Grid to be drawn only coincide at Labels.
Otherwise, they will be drawn at all axis increment positions. When the Axis.Labels.Separation property is greater than 0 (default 10), Axis increases the increment property to avoid Axis Label overlap.
Default value: true

Returns:
boolean

setTickOnLabelsOnly

public void setTickOnLabelsOnly(boolean value)
Sets the Axis Ticks and Axis Grid to be drawn to only coincide at Labels.
Default value: true

Parameters:
value - boolean

getTicks

public TicksPen getTicks()
Determines the kind of Pen used to draw Axis marks along the Axis line.
Ticks position is calculated based on Axis.Increment, Axis.Labels.Separation and Axis.Label.Style methods.
There are three kind of ticks available: Ticks, MinorTicks and TicksInner.
You can show or hide any of them of have all of them Visible. Ticks.Length defines the length of Axis Ticks in logical pixels.

Returns:
TicksPen

setTicks

public void setTicks(TicksPen value)
Accesses the Ticks characteristics.

Parameters:
value - TicksPen

getTicksInner

public TicksPen getTicksInner()
Determines the kind of Pen used to draw Axis marks along the Axis line.
This does the same as Ticks, but lines are drawn inside Chart boundaries instead. TicksInner position is calculated based on Axis.Increment, Axis.Labels.Separation and Axis.Label.Style.
There are three kind of ticks available: Ticks, MinorTicks and TicksInner.
You can show or hide any of them of have all of them Visible. TickInnerLength defines the length of Axis TicksInner in logical pixels.

Returns:
TicksPen

getTitle

public AxisTitle getTitle()
An Axis sub-class used to define Title attributes.
Axis Titles are a string of text drawn near Axes. Use Text to specify Axis Title text.
Use Font and Angle to set the format desired.

Returns:
AxisTitle

setTitle

public void setTitle(AxisTitle value)
Accesses the Axis Title characteristics.

Parameters:
value - AxisTitle

getTitleSize

public int getTitleSize()
Obsolete. Please use Axis.Title.CustomSize

Returns:
int

setTitleSize

public void setTitleSize(int value)
Obsolete. Please use Axis.Title.CustomSize

Parameters:
value - int

getVisible

public boolean getVisible()
Shows or hides the Axis lines, ticks, grids, labels and title.
You can change it both at design and runtime.
Default value: true

Returns:
boolean

setVisible

public void setVisible(boolean value)
Shows the Axis lines, ticks, grids, labels and title when true.
Default value: true

Parameters:
value - boolean

shouldSerializeZPosition

protected boolean shouldSerializeZPosition()

getZPosition

public double getZPosition()
Determines the Z axis position along chart Depth as a percentage of the total depth.
It can even be set to negative values to place the axis in front of the Chart, or values greater than 100% to place the axis behind the Chart. In 3D or orthogonal display modes, ZPosition controls where to display the axis line. It useful if you want to move axis to front or to back in 3D view.

Returns:
double

setZPosition

public void setZPosition(double value)
Sets the Z axis position along chart Depth as a percentage of the total depth.

Parameters:
value - double

getGridCentered

public boolean getGridCentered()
Obsolete. Please use Axis.Grid.Centered property

Returns:
boolean

setGridCentered

public void setGridCentered(boolean value)
Obsolete. Please use Axis.Grid.Centered property

Parameters:
value - boolean

getRelativePosition

public double getRelativePosition()
Determines the Axis position as percentage 0-100% of the Chart.
0 being Top for a horizontal Axis and Left for a vertical Axis.

Returns:
double

setRelativePosition

public void setRelativePosition(double value)
Determines the Axis position as percentage 0-100% of the Chart.

Parameters:
value - double

getPositionUnits

public PositionUnits getPositionUnits()
Defines axis Position units (pixels or percentage).
When PositionUnits is Percent, Position value is a percentage of total chart size.
When PositionUnits is Pixels, Position is considered in pixels.
Default value: Percent

Returns:
PositionUnits

setPositionUnits

public void setPositionUnits(PositionUnits value)
Determines the axis Position units (pixels or percentage).
Default value: Percent

Parameters:
value - PositionUnits

getStartPosition

public double getStartPosition()
Axis Start position on its own Axis expressed as a percentage.
For a vertical Axis a StartPosition of 75 would place the top of the Axis 75% down the Chart.
Default value: 0%

Returns:
double

setStartPosition

public void setStartPosition(double value)
Sets the Axis Start position on its own Axis expressed as a percentage.
Default value: 0%

Parameters:
value - double

getEndPosition

public double getEndPosition()
Axis End Position on its own Axis expressed as a percentage (0-100%).
For a Vertical Axis a value of 75% would place the beginning of the scale at 75% down from Top.
Default value: 100%

Returns:
double

setEndPosition

public void setEndPosition(double value)
Sets the Axis End Position on its own Axis expressed as a percentage.
Default value: 100%

Parameters:
value - double

getLogarithmicBase

public double getLogarithmicBase()
The base for the Logarithmic scale when Axis Logarithmic = true.

Returns:
double

setLogarithmicBase

public void setLogarithmicBase(double value)
Sets the base for the Logarithmic scale when Axis Logarithmic = true.

Parameters:
value - double

getMinorGrid

public ChartPen getMinorGrid()
Characteristics of the Grid coincidental to Minor Ticks.
The Minor Grid.Visible is false as default.

Returns:
ChartPen

titleOrName

public java.lang.String titleOrName()
Returns the Title or the Name of the Axis depending on whether you've
set a title or not.

Returns:
String

calcMinMax

public void calcMinMax(FloatRange tmp)
Returns the minimum and maximum values of the associated Series.

Parameters:
tmp - FloatRange

maxLabelsWidth

public int maxLabelsWidth()
Returns the maximum width in pixels of all Axis Labels.

Returns:
int

getSizeLabels

public int getSizeLabels()
Returns size (height perpendicular to its Axis) occupied by a Label.

Returns:

checkNextLabelValue

public void checkNextLabelValue(Axis axis,
                                AxisLabelValueEventArgs e)

internalCalcDepthPosValue

public int internalCalcDepthPosValue(double value)

internalCalcLogPosValue

public int internalCalcLogPosValue(boolean isx,
                                   double value)

calcPosValue

public int calcPosValue(double value)
Returns the corresponding value of a Screen position in pixels.

Parameters:
value - Screen value
Returns:
Position on screen in pixels

calcXPosValue

public int calcXPosValue(double value)
Calculates the Horizontal coordinate in pixels of Value parameter.
You can use CalcXPosValue when requiring pixel positions from which to plot Drawing output.

Parameters:
value - double
Returns:
int

calcYPosValue

public int calcYPosValue(double value)
Calculates the Vertical coordinate in pixels of Value parameter.

Parameters:
value - Value Parameter
Returns:
int Vertical coordinate in pixels

calcZPos

public int calcZPos()
Calculates the Vertical coordinate in pixels of Value parameter

Returns:
int

calcSizeValue

public int calcSizeValue(double value)
Returns the amount in pixels that corresponds to a portion of the axis of size "Value" in axis scales.

Parameters:
value - double
Returns:
int Potrtion of axis in pixels

calcPosPoint

public double calcPosPoint(int value)

internalCalcPosPoint

public double internalCalcPosPoint(int value)
Returns the corresponding value of a Screen position.

Parameters:
value - int Screen value
Returns:
double Position on screen in pixels

calcAllSeries

protected void calcAllSeries()

clicked

public boolean clicked(Point xy)
Returns if X and Y coordinates are close to the Axis position.

Parameters:
xy - Point (X and Y coordinates)
Returns:
boolean - X and Y coordinates as integer

clicked

public boolean clicked(int x,
                       int y)
Returns if X and Y coordinates are close to the Axis position.

Parameters:
x - Pixel location
y - Pixel location
Returns:
boolean - true if X and Y coordinates are on or near to Axis
See Also:
Axes

getMaxXValue

public double getMaxXValue()
Returns the calculated Maximum Horizontal value for the specified AAxis.
AAxis can be Axis.Top or Axis.Bottom. Calculated means that the return value will be the Maximum value of the Maximum Series X Values. Only Series with the HorizontalAxis equal to AAxis will be considered.

Returns:
double
See Also:
Axes, getMinXValue(), getMinYValue(), getMaxYValue()

getMaxYValue

public double getMaxYValue()
Returns the calculated Maximum Vertical value for the specified AAxis.
AAxis can be Axis.Left or Axis.Right. Calculated means that the return value will be the Maximum value of the Maximum Series Y Values. Only Series with the VerticalAxis equal to AAxis will be considered.

Returns:
double
See Also:
Axes, getMinXValue(), getMaxXValue(), getMinYValue()

getMinXValue

public double getMinXValue()
Returns the calculated Minimum Horizontal value for the specified AAxis.
AAxis can be Axis.Top or Axis.Bottom. Calculated means that the return value will the Minimum value of the Minimum Series X Values. Only Series with the HorizontalAxis equal to AAxis will be considered.

Returns:
double
See Also:
Axes, getMaxXValue(), getMinYValue(), getMaxYValue()

getMinYValue

public double getMinYValue()
Returns the calculted Minimum Vertical value for the specified AAxis.
AAxis can be Axis.Left or Axis.Right. Calculated means that the return value will the Minimum value of the Minimum Series Y Values. Only Series with the VerticalAxis equal to AAxis will be considered.

Returns:
double
See Also:
Axes, getMinXValue(), getMaxXValue(), getMaxYValue()

dateTimeDefaultFormat

public net.rim.device.api.i18n.DateFormat dateTimeDefaultFormat(double astep)
Returns either a Time or Date format depending if the astep parameter is lower than one day (time) or greater (date).

Parameters:
astep - double
Returns:
DateFormat

calcXYIncrement

public double calcXYIncrement(int maxLabelSize)
Returns the calculated Axis Label increment.

Parameters:
maxLabelSize - int The maximum allowable LabelSize in pixels.
Returns:
double Size of increment in Axis units.

getCalcIncrement

public double getCalcIncrement()
Returns the calculated Axis Label increment and serves as a useable measure when Labelling is set to manual or automatic increments.
Please note that the related Increment property only returns the increment value when those increments are manually set via the same property.

Returns:
double calculated Axis Label increment.

getSizeTickAxis

public int getSizeTickAxis()
Returns the greater of lengths of Ticks or MinorTicks

Returns:
int

inflateAxisPos

public int inflateAxisPos(int value,
                          int amount)

calcRect

public Rectangle calcRect(Rectangle r,
                          boolean inflateChartRectangle)
Used internally by Chart when creating Axes

Parameters:
r - Chart Rectangle
inflateChartRectangle - boolean Wall allowance (standard Axes only)
Returns:
Rectangle

findDateTimeStep

public static int findDateTimeStep(double stepValue)
Used internally to return Axis Datetime step.

Parameters:
stepValue - double Desired increment
Returns:
int

drawAxisLabel

public void drawAxisLabel(int x,
                          int y,
                          int angle,
                          java.lang.String st,
                          TextShape labelItem)
Draws Axis Label (String) at specified X,Y co-ordinate at Angle.

Parameters:
x - int x coordinate
y - int y coordinate
angle - int Angle at which Label is drawn
st - String asociated to Label
labelItem - TextShape

drawAxisLabel

public void drawAxisLabel(ChartFont f,
                          int x,
                          int y,
                          int angle,
                          java.lang.String st,
                          TextShape format)
Draws Axis Label (String) in font f at specified X,Y co-ordinate at Angle.

Parameters:
f - ChartFont
x - int x coordinate
y - int y coordinate
angle - int Angle at which Label is drawn
st - String asociated to Label
format - TextShape

getDepthAxisAlign

protected StringAlignment getDepthAxisAlign()

drawTitle

public void drawTitle(int x,
                      int y)
TeeChart internal use. Outputs the title during the chart painting procedure.

Parameters:
x - int x coordinate
y - int y coordinate

incDecDateTime

protected double incDecDateTime(boolean increment,
                                double value,
                                double anIncrement,
                                int tmpWhichDatetime)

dateTimeIncrement

public double dateTimeIncrement(boolean isDateTime,
                                boolean increment,
                                double value,
                                double anIncrement,
                                int tmpWhichDatetime)
Is a set of constants used to specify a date time increment.

Parameters:
isDateTime - boolean
increment - boolean
value - double
anIncrement - double
tmpWhichDatetime - int
Returns:
double date time increment value

calcLabelStyle

public AxisLabelStyle calcLabelStyle()
Returns the most logical Axis Label style.
It calculates the "best candidate" label style based on how many Active Series are in the Chart and if the Series has point labels. The LabelStyle property must be set to talAuto for this function to work.
If LabelStyle is not talAuto, the LabelStyle property value is returned.

Returns:
AxisLabelStyle

draw

public void draw(IGraphics3D g,
                 boolean calcPosAxis)
Displays an Axis at the specified screen positions with the current
axis scales.

Parameters:
g - IGraphics3D
calcPosAxis - boolean

draw

public void draw(boolean calcPosAxis)
Displays an Axis at the specified screen positions with the current axis scales.
Normally you do not need to call the Draw method directly.

Parameters:
calcPosAxis - boolean True if space allowance for Axis Labelling required

drawLineSegment

public void drawLineSegment(int aStart,
                            int aEnd)

internalCalcPositions

protected void internalCalcPositions()

draw

public void draw(int posLabels,
                 int posTitle,
                 int posAxis,
                 boolean gridVisible)
Displays an Axis at the specified screen positions with the current axis scales.
Main drawing method. Custom draw methods can be overloads.

Parameters:
posLabels - int
posTitle - int
posAxis - int
gridVisible - boolean

draw

public void draw(int posLabels,
                 int posTitle,
                 int posAxis,
                 boolean gridVisible,
                 int aStartPos,
                 int aEndPos)
Displays an Axis at the specified screen positions with the current axis scales.
Main drawing method. Custom draw methods can be overloads.

Parameters:
posLabels - int
posTitle - int
posAxis - int
gridVisible - boolean
aStartPos - int
aEndPos - int

scroll

public void scroll(double offset,
                   boolean checkLimits)
Scrolls or displaces the Axis Maximum and Minimum values by the Offset parameter.
If you want to scroll the Axis outside Series limits, CheckLimits must be false.

Parameters:
offset - double
checkLimits - boolean

setMinMax

public void setMinMax(DateTime minDate,
                      DateTime maxDate)
Changes the current Axis Minimum and Maximum scales.
Axis.Automatic must be set to false.

Parameters:
minDate - DateTime Axis Minimum scale
maxDate - DateTime Axis Maximum scale

setMinMax

public void setMinMax(double min,
                      double max)
Changes the current Axis Minimum and Maximum scales.
Axis.Automatic must be set to false.

Parameters:
min - double Axis Minimum scale
max - double Axis Maximum scale

setChart

public void setChart(IBaseChart c)
Description copied from class: TeeBase
Chart associated with this object.

Overrides:
setChart in class TeeBase
Parameters:
c - IBaseChart

draw

public void draw(int posLabels,
                 int posTitle,
                 int posAxis,
                 boolean gridVisible,
                 double aMinimum,
                 double aMaximum,
                 int aStartPosition,
                 int aEndPosition)
Displays an Axis at the specified screen positions with the current axis scales.
Main drawing method. Custom draw methods can be overloads.

Parameters:
posLabels - int
posTitle - int
posAxis - int
gridVisible - boolean
aMinimum - double
aMaximum - double
aStartPosition - int
aEndPosition - int

draw

public void draw(int posLabels,
                 int posTitle,
                 int posAxis,
                 boolean gridVisible,
                 double aMinimum,
                 double aMaximum,
                 double aIncrement,
                 int aStartPos,
                 int aEndPos)
Displays an Axis at the specified screen positions with the current axis scales.
Main drawing method. Custom draw methods can be overloads.

Parameters:
posLabels - int
posTitle - int
posAxis - int
gridVisible - boolean
aMinimum - double
aMaximum - double
aIncrement - double
aStartPos - int
aEndPos - int

getMaxRound

public boolean getMaxRound()
Defines the maximum value for the axis scales to round to when True

Returns:

setMaxRound

public void setMaxRound(boolean value)
Sets the maximum value for the axis scales to round to when True

Parameters:
value -

getMinRound

public boolean getMinRound()
Defines the minimum value for the axis scales to round to when True

Returns:

setMinRound

public void setMinRound(boolean value)
Sets the minimum value for the axis scales to round to when True

Parameters:
value -

calcRoundScales

public void calcRoundScales()
Rounds Axis scale to integer values


calcIncrement

public double calcIncrement()
Returns the calculated Axis Label increment and serves as a useable measure when Labelling is set to manual or automatic increments.
Please note that the related Increment property only returns the
increment value when those increments are manually set via the same
property.

Returns:
double calculated Axis Label increment.

getInflateAxisPos

public int getInflateAxisPos(int value,
                             int amount)

setPosTitle

public void setPosTitle(int value)
Internal use.

Parameters:
value -

getPartnerAxis

public Axis getPartnerAxis()

setPartnerAxis

public void setPartnerAxis(Axis value)

getUsePartnerAxis

public boolean getUsePartnerAxis()

setUsePartnerAxis

public void setUsePartnerAxis(boolean value)