OverviewSingleDeprecated

jsx3.chart

class LinearAxis

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.chart.ChartComponent
          ->jsx3.chart.Axis
            ->jsx3.chart.LinearAxis

All Implemented Interfaces:

jsx3.gui.Interactive, jsx3.util.EventDispatcher

class LinearAxis
extends jsx3.chart.Axis
Type of axis that displays a linear range of values.

Field Summary
static int
MAX_INTERVALS
The maximum number of intervals to show when calculating by auto adjust.
static int
MIN_INTERVALS
The minimum number of intervals to show when calculating by auto adjust.
Constructor Summary
void
init(name : String, horizontal : boolean, primary : boolean)
The instance initializer.
Method Summary
boolean
Returns the autoAdjust field, whether to adjust the max/min/interval to the range of the data.
boolean
Returns the baseAtZero field, whether to set either the min or max value of this axis to 0 if applicable and if autoAdjust is true.
int
convert a number value to a coordinate between 0 and this.length, if the value is outside of the range of the axis, return the closest value in the range
void
same as getCoordinateFor(), but does not clip to bounds of the axis
int
Returns the interval field, the interval between major ticks, overrides autoAdjust.
int
Returns the max field, the maximum value displayed by this axis, overrides autoAdjust.
int
Returns the min field, the minimum value displayed by this axis, overrides autoAdjust.
static String
Deprecated.
void
setAutoAdjust(autoAdjust : boolean)
Sets the autoAdjust field.
void
setBaseAtZero(baseAtZero : boolean)
Sets the baseAtZero field.
void
setInterval(interval : int)
Sets the interval field.
void
setMax(max : int)
Sets the max field.
void
setMin(min : int)
Sets the min field.
Methods Inherited From jsx3.chart.Axis
getAxisStroke, getAxisTitle, getDisplayWidth, getHorizontal, getLabelClass, getLabelColor, getLabelFunction, getLabelGap, getLabelStyle, getMinorTickDivisions, getMinorTickLength, getMinorTickPlacement, getMinorTickStroke, getOpposingAxis, getShowAxis, getShowLabels, getTickLength, getTickPlacement, getTickStroke, setAxisStroke, setDisplayWidth, setHorizontal, setLabelClass, setLabelColor, setLabelFunction, setLabelGap, setLabelPlacement, setLabelStyle, setMinorTickDivisions, setMinorTickLength, setMinorTickPlacement, setMinorTickStroke, setShowAxis, setShowLabels, setTickLength, setTickPlacement, setTickStroke
Methods Inherited From jsx3.chart.ChartComponent
getChart
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, paint, setBackground, setBackgroundColor, setBorder, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

MAX_INTERVALS

static int MAX_INTERVALS
The maximum number of intervals to show when calculating by auto adjust.

MIN_INTERVALS

static int MIN_INTERVALS
The minimum number of intervals to show when calculating by auto adjust.
Constructor Detail

init

void init(name : String, horizontal : boolean, primary : boolean)
The instance initializer.

Parameters:

namethe GI name of the instance
horizontalwhether this axis is horizontal (x), otherwise it's vertical (y)
primarywhether this axis is primary, otherwise it's secondary
Method Detail

getAutoAdjust

boolean getAutoAdjust()
Returns the autoAdjust field, whether to adjust the max/min/interval to the range of the data.

Returns:

autoAdjust  

getBaseAtZero

boolean getBaseAtZero()
Returns the baseAtZero field, whether to set either the min or max value of this axis to 0 if applicable and if autoAdjust is true.

Returns:

baseAtZero  

getCoordinateFor

int getCoordinateFor(value : Number)
convert a number value to a coordinate between 0 and this.length, if the value is outside of the range of the axis, return the closest value in the range

Parameters:

valuea value displayed along the axis

Returns:

coordinate along the axis  

getCoordinateForNoClip

void getCoordinateForNoClip(value : ?)
same as getCoordinateFor(), but does not clip to bounds of the axis

Parameters:

value

getInterval

int getInterval()
Returns the interval field, the interval between major ticks, overrides autoAdjust.

Returns:

interval  

getMax

int getMax()
Returns the max field, the maximum value displayed by this axis, overrides autoAdjust.

Returns:

max  

getMin

int getMin()
Returns the min field, the minimum value displayed by this axis, overrides autoAdjust.

Returns:

min  

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00").

Returns:

 

setAutoAdjust

void setAutoAdjust(autoAdjust : boolean)
Sets the autoAdjust field.

Parameters:

autoAdjustthe new value for autoAdjust

setBaseAtZero

void setBaseAtZero(baseAtZero : boolean)
Sets the baseAtZero field.

Parameters:

baseAtZerothe new value for baseAtZero

setInterval

void setInterval(interval : int)
Sets the interval field.

Parameters:

intervalthe new value for interval

setMax

void setMax(max : int)
Sets the max field.

Parameters:

maxthe new value for max

setMin

void setMin(min : int)
Sets the min field.

Parameters:

minthe new value for min