new Axis(userOptions)
HTML element for drawing an axis with rules and labels. An axis can reside in any of the four border locations around a plot body. (see AxisLocation)
Parameters:
Name | Type | Description |
---|---|---|
userOptions |
Axis.Options | Options for the axis which extends Element.Options |
- Source:
Extends
Members
flipDirection :Boolean
If set to true, axis scale will be flipped with respect to the default. The default axis direction increases left to right, and bottom to top.
Type:
- Boolean
- Source:
range :Array.<Number>
A two element array containing the axis min and max values [min, max] as floating point numbers.
Type:
- Array.<Number>
- Source:
title
- Source:
Methods
_rebuildLists()
Rebuild lists for this drawable and notify any parent drawable to do so as well. This ensures each drawable contains an updated, flat list of all the drawables beneath them. This way we save performance by not recursing through each child during draw time, and instead, drawing from the flat list at the level we care about.
- Inherited From:
- Source:
add(children)
Add a child drawable to this instance
Parameters:
Name | Type | Description |
---|---|---|
children |
Array.<Drawable> | Drawable | child drawables to add |
- Inherited From:
- Source:
remove(children)
Remove a child drawable from this instance
Parameters:
Name | Type | Description |
---|---|---|
children |
Array.<Drawable> | Drawable | child drawables to remove |
- Inherited From:
- Source:
Type Definitions
Options
These are the options specific to this class. Other options provided by Element.Options can also be passed to create an Axis.
Properties:
Name | Type | Description |
---|---|---|
axis |
AxisLocation | Axis location |
range |
Array.<Number> | Min and max values of axis scale [min, max] |
flipDirection |
Boolean | If true, the axis direction will be flipped with respect to the default direction |
numLabels |
Number | Number of axis labels. |
numMajorTicks |
Number | Number of major ticks |
numMinorTicks |
Number | Number of minor ticks (ticks between major ticks) |
- Source: