class Axis
All Implemented Interfaces:
Direct Known Subclasses:
A base class for all types of axis. Provides all the common properties as well as all rendering
logic. Rendering relies on template methods implemented in concrete subclasses.
An axis renders in the following location based on its horizontal and primary properties:
horizontal x primary -> bottom
vertical x primary -> left
horizontal x secondary -> top
vertical x secondary -> right
| Constructor Summary |
|---|
| void | The instance initializer. |
| Method Summary |
|---|
| String | Returns the axisStroke field, string representation of the VectorStroke used to draw the line of the axis. |
| jsx3.chart.ChartLabel | Returns the optional jsx3.chart.ChartLabel child. |
| int | Returns the display width, the maximum amount of space perpendicular to the axis and outside of the data area that the ticks and labels may occupy (doesn't include area given to axis title). |
| boolean | Returns the horizontal field, whether this is an x axis, otherwise it is a y axis. |
| String | Returns the labelClass field, the CSS class used to render major tick labels. |
| String | Number | Returns the labelColor field, the RGB color value of the label font; note that this is the only way to set the color of the text, using a CSS style attribute will have no effect. |
| Function | Returns the labelFunction field. |
| int | Returns the labelGap field, the pixel gap between the tick lines and the labels. |
| String | Returns the labelStyle field, the CSS style attribute used to render major tick labels. |
| int | Returns the minorTickDivisions field, number of minor tick divisions between major ticks; the number of minor ticks drawn will be this number minus 1. |
| int | Returns the minorTickLength field, the length in pixels of the minor tick (if tickPlacement is "cross" the length will actually be twice this. |
| String | Returns the minorTickPlacement field, where to place the minor ticks. |
| String | Returns the minorTickStroke field, string representation of VectorStroke used to draw minor ticks. |
| jsx3.chart.Axis | Returns the opposing axis. |
| boolean | Returns the showAxis field, whether to show the line along the axis. |
| boolean | Returns the showLabels field, whether to show major tick labels. |
| int | Returns the tickLength field, the length in pixels of the major tick (if tickPlacement is "cross" the length will actually be twice this. |
| String | Returns the tickPlacement field, where to place the major ticks. |
| String | Returns the tickStroke field, string representation of VectorStroke used to draw major ticks. |
| static String | |
| static String | formats labels as a percent, ie "50%" |
| static String | formats labels in scientific notation, ie "5e2" |
| void | Sets the axisStroke field. |
| void | Sets the displayWidth field. |
| void | Sets the horizontal field. |
| void | Sets the labelClass field. |
| void | Sets the labelColor field. |
| void | Sets the labelFunction field, allows for formatting and transformation of a major tick label; should eval to a function with the signature function(object) : string. |
| void | Sets the labelGap field. |
| void | Sets the labelPlacement field, checks for invalid values. |
| void | Sets the labelStyle field. |
| void | Sets the minorTickDivisions field. |
| void | Sets the minorTickLength field. |
| void | Sets the minorTickPlacement field. |
| void | Sets the minorTickStroke field. |
| void | Sets the showAxis field. |
| void | Sets the showLabels field. |
| void | Sets the tickLength field. |
| void | Sets the tickPlacement field. |
| void | Sets the tickStroke field. |
| Methods Inherited From jsx3.chart.ChartComponent |
|---|
| getChart |
| Methods Inherited From jsx3.gui.Block |
|---|
| getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, 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, setCDFAttribute, setCDFId, 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, onAfterRestoreView, 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.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
static final
String LABEL_AXIS
static final
String LABEL_HIGH
static final
String TICK_CROSS
static final
String TICK_INSIDE
static final
String TICK_OUTSIDE
The instance initializer.
Parameters:
name – the GI name of the instance
horizontal – whether this axis is horizontal (x), otherwise it's vertical (y)
primary – whether this axis is primary, otherwise it's secondary
Returns the axisStroke field, string representation of the VectorStroke used to draw the line of the axis.
Returns:
axisStroke
Returns the optional jsx3.chart.ChartLabel child.
Returns:
Returns the display width, the maximum amount of space perpendicular to the axis and outside of the data area that the ticks and labels may occupy (doesn't include area given to axis title).
Returns:
displayWidth
Returns the horizontal field, whether this is an x axis, otherwise it is a y axis.
Returns:
horizontal
Returns the labelClass field, the CSS class used to render major tick labels.
Returns:
labelClass
Returns the labelColor field, the RGB color value of the label font; note that this is the only way to set the color of the text, using a CSS style attribute will have no effect.
Returns:
labelColor
Returns the labelFunction field.
Returns:
labelFunction
Returns the labelGap field, the pixel gap between the tick lines and the labels.
Returns:
labelGap
Returns the labelStyle field, the CSS style attribute used to render major tick labels.
Returns:
labelStyle
int getMinorTickDivisions()
Returns the minorTickDivisions field, number of minor tick divisions between major ticks; the number of minor ticks drawn will be this number minus 1.
Returns:
minorTickDivisions
Returns the minorTickLength field, the length in pixels of the minor tick (if tickPlacement is "cross" the length will actually be twice this.
Returns:
minorTickLength
String getMinorTickPlacement()
Returns the minorTickPlacement field, where to place the minor ticks.
Returns:
minorTickPlacement, one of {'none','inside','outside','cross'}
Returns the minorTickStroke field, string representation of VectorStroke used to draw minor ticks.
Returns:
minorTickStroke
Returns the opposing axis.
Returns:
Returns the showAxis field, whether to show the line along the axis.
Returns:
showAxis
Returns the showLabels field, whether to show major tick labels.
Returns:
showLabels
Returns the tickLength field, the length in pixels of the major tick (if tickPlacement is "cross" the length will actually be twice this.
Returns:
tickLength
Returns the tickPlacement field, where to place the major ticks.
Returns:
tickPlacement, one of {'none','inside','outside','cross'}
Returns the tickStroke field, string representation of VectorStroke used to draw major ticks.
Returns:
tickStroke
Deprecated.
Returns the release/build for the class (i.e., "2.2.00").
Returns:
formats labels as a percent, ie "50%"
Parameters:
Returns:
formats labels in scientific notation, ie "5e2"
Parameters:
Returns:
void setAxisStroke(axisStroke
: String)
Sets the axisStroke field.
Parameters:
axisStroke – the new value for axisStroke
void setDisplayWidth(displayWidth
: int)
Sets the displayWidth field.
Parameters:
displayWidth – the new value for displayWidth
void setHorizontal(horizontal
: boolean)
Sets the horizontal field.
Parameters:
horizontal – the new value for horizontal
void setLabelClass(labelClass
: String)
Sets the labelClass field.
Parameters:
labelClass – the new value for labelClass
Sets the labelColor field.
Parameters:
labelColor – the new value for labelColor
void setLabelFunction(labelFunction
: String)
Sets the labelFunction field, allows for formatting and transformation of a major tick label; should eval to a function with the signature function(object) : string.
Parameters:
labelFunction – the new value for labelFunction
void setLabelGap(labelGap
: int)
Sets the labelGap field.
Parameters:
labelGap – the new value for labelGap
void setLabelPlacement(labelPlacement
: String)
Sets the labelPlacement field, checks for invalid values.
Parameters:
labelPlacement – the new value for labelPlacement, one of {'axis','high','low'}
void setLabelStyle(labelStyle
: String)
Sets the labelStyle field.
Parameters:
labelStyle – the new value for labelStyle
void setMinorTickDivisions(minorTickDivisions
: int)
Sets the minorTickDivisions field.
Parameters:
minorTickDivisions – the new value for minorTickDivisions
void setMinorTickLength(minorTickLength
: int)
Sets the minorTickLength field.
Parameters:
minorTickLength – the new value for minorTickLength
void setMinorTickPlacement(minorTickPlacement
: String)
Sets the minorTickPlacement field.
Parameters:
minorTickPlacement – the new value for minorTickPlacement, one of {'none','inside','outside','cross'}
void setMinorTickStroke(minorTickStroke
: String)
Sets the minorTickStroke field.
Parameters:
minorTickStroke – the new value for minorTickStroke
void setShowAxis(showAxis
: boolean)
Sets the showAxis field.
Parameters:
showAxis – the new value for showAxis
void setShowLabels(showLabels
: boolean)
Sets the showLabels field.
Parameters:
showLabels – the new value for showLabels
void setTickLength(tickLength
: int)
Sets the tickLength field.
Parameters:
tickLength – the new value for tickLength
void setTickPlacement(tickPlacement
: String)
Sets the tickPlacement field.
Parameters:
tickPlacement – the new value for tickPlacement, one of {'none','inside','outside','cross'}
void setTickStroke(tickStroke
: String)
Sets the tickStroke field.
Parameters:
tickStroke – the new value for tickStroke
Copyright © 2001-2008, TIBCO Software Inc.