com.sencha.gxt.chart.client.chart.axis
Class NumericAxis<M>

java.lang.Object
  extended by com.sencha.gxt.chart.client.chart.axis.Axis<M,V>
      extended by com.sencha.gxt.chart.client.chart.axis.CartesianAxis<M,Number>
          extended by com.sencha.gxt.chart.client.chart.axis.NumericAxis<M>
Type Parameters:
M - the data type that the axis uses
All Implemented Interfaces:
AxisHandler.HasAxisHandlers, AxisItemOutEvent.HasAxisItemOutHandlers, AxisItemOverEvent.HasAxisItemOverHandlers, AxisSelectionEvent.HasAxisSelectionHandlers

public class NumericAxis<M>
extends CartesianAxis<M,Number>

An axis to handle numeric values. This axis is used for quantitative data as opposed to the category axis. You can set minimum and maximum values to the axis so that the values are bound to that. If no values are set, then the scale will auto-adjust to the values.


Nested Class Summary
 class NumericAxis.Step
          Class that represents a tick mark step in CartesianAxis.
 
Constructor Summary
NumericAxis()
          Creates a numeric axis.
 
Method Summary
 void addField(ValueProvider<M,? extends Number> field)
          Adds a ValueProvider to provide data to a field of the axis.
 void calcEnds()
          Calculate the start, end and step points.
 double getMaximum()
          Returns the maximum value of the axis.
 double getMinimum()
          Returns the minimum value of the axis.
 boolean isAdjustMaximumByMajorUnit()
          Returns true if the axis adjusts the minimum.
 boolean isAdjustMinimumByMajorUnit()
          Returns true if the axis adjusts the maximum.
 void setAdjustMaximumByMajorUnit(boolean adjustMaximumByMajorUnit)
          Sets true if the axis adjusts the maximum.
 void setAdjustMinimumByMajorUnit(boolean adjustMinimumByMajorUnit)
          Sets true if the axis adjusts the minimum.
 void setMaximum(double maximum)
          Sets the maximum value of the axis.
 void setMinimum(double minimum)
          Sets the minimum value of the axis.
 
Methods inherited from class com.sencha.gxt.chart.client.chart.axis.CartesianAxis
delete, drawAxis, drawLabels, getDashSize, getDepth, getGridDefaultConfig, getGridEvenConfig, getGridOddConfig, getHeight, getLabelTolerance, getLength, getMinorTickSteps, getPosition, getTextLabelPadding, getWidth, setDashSize, setDepth, setGridDefaultConfig, setGridEvenConfig, setGridOddConfig, setHeight, setLabelTolerance, setLength, setMinorTickSteps, setPosition, setTextLabelPadding, setWidth
 
Methods inherited from class com.sencha.gxt.chart.client.chart.axis.Axis
addAxisHandler, addAxisItemOutHandler, addAxisItemOverHandler, addAxisSelectionHandler, getAxisConfig, getBBox, getChart, getFrom, getLabelConfig, getLabelProvider, getSteps, getTitleConfig, getTo, getX, getY, isDisplayGrid, isHidden, onMouseDown, onMouseMove, onMouseOut, removeToolTip, setAxisConfig, setChart, setDisplayGrid, setHidden, setLabelConfig, setLabelProvider, setSteps, setTitleConfig, setToolTipConfig, setX, setY
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericAxis

public NumericAxis()
Creates a numeric axis.

Method Detail

addField

public void addField(ValueProvider<M,? extends Number> field)
Adds a ValueProvider to provide data to a field of the axis.

Parameters:
field - the value provider

calcEnds

public void calcEnds()
Calculate the start, end and step points.


getMaximum

public double getMaximum()
Returns the maximum value of the axis.

Returns:
the maximum value of the axis

getMinimum

public double getMinimum()
Returns the minimum value of the axis.

Returns:
the minimum value of the axis

isAdjustMaximumByMajorUnit

public boolean isAdjustMaximumByMajorUnit()
Returns true if the axis adjusts the minimum.

Returns:
true if the axis adjusts the minimum

isAdjustMinimumByMajorUnit

public boolean isAdjustMinimumByMajorUnit()
Returns true if the axis adjusts the maximum.

Returns:
true if the axis adjusts the maximum

setAdjustMaximumByMajorUnit

public void setAdjustMaximumByMajorUnit(boolean adjustMaximumByMajorUnit)
Sets true if the axis adjusts the maximum.

Parameters:
adjustMaximumByMajorUnit - true if the axis adjusts the maximum

setAdjustMinimumByMajorUnit

public void setAdjustMinimumByMajorUnit(boolean adjustMinimumByMajorUnit)
Sets true if the axis adjusts the minimum.

Parameters:
adjustMinimumByMajorUnit - true if the axis adjusts the minimum

setMaximum

public void setMaximum(double maximum)
Sets the maximum value of the axis.

Parameters:
maximum - the maximum value of the axis

setMinimum

public void setMinimum(double minimum)
Sets the minimum value of the axis.

Parameters:
minimum - the minimum value of the axis


Copyright © 2011. All Rights Reserved.