Class: AxisScale


new AxisScale(userOptions)

DrawRegion drawing scale for axis. Intended to be used as a subelement for Axis, or anywhere that a horizontal or vertical scale, with major and minor ticks are needed.

Name Type Description
userOptions AxisScale.Options

User provided options for the axis which extends module:Element~Options



  • module:Element

Type Definitions


These are the options specific to this class. Other options provided by Element.Options can also be passed to create an Axis.

Name Type Description
axis AxisLocation

Axis location. Scale will be drawn as follows: X_AXIS_TOP : Spine on the bottom, ticks bottom to top Y_AXIS_LEFT : Spine on the right, ticks right to left X_AXIS_BOTTOM : Spine on the top, ticks top to bottom Y_AXIS_RIGHT : Spin on the left, ticks left to right

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

numMajorTicks Number

Number of major ticks, and also labels that will be displayed on the axis

numMinorTicks Number

Number of minor ticks (ticks between major ticks)