Chart that owns the Axis.
Describe height direction of axis, affects label position, tick line and grid line directions.
Height Scale or the Axis
Pair of scales, which describes space of axis sub-elements
Scale of Axis.
Add a highlighter Band to the Axis. A Band can be used to highlight an interval on the Axis.
Is Band rendered above Series, or below. Default to above.
Band object.
Add a highlighter ConstantLine to the Axis. A ConstantLine can be used to highlight a specific value on the Axis.
Is ConstantLine rendered above Series, or below. Default to above.
ConstantLine object.
Add custom tick.
Example usage:
// Custom tick with default background
Axis.addCustomTick(undefined)
// Custom tick with no background
Axis.addCustomTick(addStyler((textBox) => textBox.setBackground((bg) => bg.setFillStyle(emptyFill))))
Builder for marker of custom tick. Currently only option is a version of UIElementBuilders.PointableTextBox
CustomTick created object
Disable all animations for the Axis.
After calling this function, animations (Zooming, scaling) will be disabled. Animations must be recreated manually afterwards.
Axis itself for fluent interface.
Dispose all Axis sub-elements and remove this Axis from collection it's in.
this for fluent interface
Fit axis view to attached series.
Boolean for animation enabled, or number for animation duration in milliseconds
Freeze axis to fitted view? False by default.
Format a value along axis to string. Behavior depends on the Axis' TickStrategy. Eq. A DateTime-Axis will interpret 'value' as a Date.
Value along axis
Value formated to string
Get is mouse-interaction enabled: Panning by dragging on axis. (RMB)
Boolean flag
Get is mouse-interaction enabled: Release axis by double-clicking on axis.
Boolean flag
Get is mouse-interaction enabled: Zooming by dragging on axis. (LMB)
Boolean flag
Get is mouse-interaction enabled: Zooming by mouse-wheeling on axis.
Boolean flag
Get mouse style when hovering over axis area.
Mouse-style preset name
Get mouse style when panning axis.
Mouse-style preset name
Get mouse style when zooming axis.
Mouse-style preset name
Get is mouse-interaction enabled: Fitting by capturing rectangle on chart.
Boolean flag
Get is mouse-interaction enabled: Panning by dragging on chart.
Boolean flag
Get is mouse-interaction enabled: Zooming by capturing rectangle on chart.
Boolean flag
Get is mouse-interaction enabled: Zooming by mouse-wheeling on chart.
Boolean flag
Get height of axis in pixels
Number
Get all Highlighters of Axis.
array of highlighters
Get is mouse-interaction enabled: Scaling by dragging on nib.
Boolean flag
Get is mouse-interaction enabled: Scaling by mouse-wheeling on nib.
Boolean flag
Axis nib stroke length in pixels
Get mouse style when hovering over nib area.
Mouse-style preset name
Get size of nib mouse-picking area in pixels.
Size in pixels
Get mouse style when hovering over nib area.
Mouse-style preset name
Get style of nib overlay (shown only when interacting with mouse / touch).
FillStyle object
nib stroke fillstyle as a Fillstyle object
Get style of axis overlay (shown only when interacting with mouse / touch).
FillStyle object
Current AxisScrollStrategy
Axis stroke as a LineStyle object
Get the currently used tick strategy
Axis title string
Axis title fillstyle
Get font of axis labels.
FontSettings
Padding after Axis title
Get position of axis on its chart as a %
True if all Axis sub-elements are disposed, false if not.
Get is axes' scrolling currently prevented by usage of mouse-interactions or 'stop()' method.
Boolean flag
Remove subscription from scale change event
Event listener
True if the listener is successfully removed and false if it is not found
Subscribe to on scale change event
Event listener
Token that is used to unsubscribe from the event
Undo effects of 'stop'.
Restore all Axis sub-elements and restore this Axis to the collection it was in.
this for fluent interface
Specifies scroll animation.
Boolean flag for whether scrolling should be animated or not.
Specifies zoom animation to use.
Example usage:
Desired result | Argument | Parameters |
---|---|---|
Change animation | setAnimationZoom(AnimationEasings.easeOut, 500) | First parameter defines the easing to use for the animation. Second parameter is optional, and defines the duration for the animation |
Disable zooming animations | axis.setAnimationZoom(undefined) | Passing undefined as the parameter will disable the zooming animations for the Axis. |
Easing of animation. Undefined disables zoom animations. See 'engine/animator.Easings' for defaults
Optional default duration for zooming animations in milliseconds
Set is mouse-interaction enabled: Panning by dragging on axis. (RMB)
Boolean flag
Set is mouse-interaction enabled: Release axis by double-clicking on axis.
Boolean flag
Set is mouse-interaction enabled: Zooming by dragging on axis. (LMB)
Boolean flag
Set is mouse-interaction enabled: Zooming by mouse-wheeling on axis.
Boolean flag
Set mouse style when hovering over axis area.
Mouse-style preset name (see MouseStyles)
Object itself
Set mouse style when panning axis.
Mouse-style preset name (see MouseStyles)
Object itself
Set mouse style when zooming axis.
Mouse-style preset name (see MouseStyles)
Object itself
Set is mouse-interaction enabled: Fitting by capturing rectangle on chart.
Boolean flag
Set is mouse-interaction enabled: Panning by dragging on chart.
Boolean flag
Set is mouse-interaction enabled: Zooming by capturing rectangle on chart.
Boolean flag
Set is mouse-interaction enabled: Zooming by mouse-wheeling on chart.
Boolean flag
Set all states of chart mouse interactions on axis at once.
Boolean flag
Set axis scale interval.
Start scale value
End scale value
Boolean for animation enabled, or number for animation duration in milliseconds
If true, disables automatic scrolling after setting interval
Object itself for fluent interface
Set enabled flags for all mouse-interactions on axis directly. Does not affect chart mouse-interactions.
Boolean: are mouse-interactions enabled
Axis itself for fluent interface
Set is mouse-interaction enabled: Scaling by dragging on nib.
Boolean flag
Set is mouse-interaction enabled: Scaling by mouse-wheeling on nib.
Boolean flag
Specifies Axis nib stroke length in pixels
Axis nib stroke length in pixels
Axis itself for fluent interface
Set mouse style when hovering over nib area.
Mouse-style preset name (see MouseStyles)
Object itself
Set ideal size of nib mouse-picking area in pixels.
Size in pixels
Object itself
Set mouse style when scaling nib.
Mouse-style preset name (see MouseStyles)
Object itself
Set style of nib overlay (shown only when interacting with mouse / touch).
FillStyle object or mutator to modify existing one
Specifies Axis nibs StrokeStyle
LineStyle object or mutator to modify existing one
Axis itself for fluent interface
Set style of axis overlay (shown only when interacting with mouse / touch).
FillStyle object or mutator to modify existing one
Specify ScrollStrategy of the Axis. This decides where the Axis scrolls based on current view and series boundaries.
AxisScrollStrategy or undefined to disable automatic scrolling. See AxisScrollStrategies for all options.
Object itself for fluent interface.
Specifies axis stroke
Axis stroke style
Axis itself for fluent interface
Set TickStrategy of Axis.
The TickStrategy defines the positioning and formatting logic of Axis ticks as well as the style of created ticks.
Example usage:
DateTime Axis:
Axis.setTickStrategy( AxisTickStrategies.DateTime )
Disable automatic ticks completely:
Axis.setTickStrategy( AxisTickStrategies.Empty )
Customized TickStrategy:
Axis.setTickStrategy( AxisTickStrategies.Numeric, ( tickStrategy: NumericTickStrategy ) => tickStrategy
.setNumericUnits( true )
.setMajorTickStyle( ( tickStyle ) => tickStyle
.setLabelFont( ( font ) => font
.setWeight( 'bold' )
)
)
)
Type table for optional second parameter ('styler'):
tickStrategy | styler |
---|---|
'Numeric' | ( tickStrategy: NumericTickStrategy ) => tickStrategy |
'DateTime' | ( tickStrategy: DateTimeTickStrategy ) => tickStrategy |
'Empty' | undefined |
Selected TickStrategy. See AxisTickStrategies for a collection of options.
Optional callback that can be used to customize the TickStrategy. The type of supplied TickStrategy object depends on what was supplied to 'tickStrategy' parameter; See the above method documentation for a value table.
Object itself for fluent interface.
Specifies an Axis title string
Axis title as a string
Axis itself for fluent interface
Specifies Axis title FillStyle
FillStyle of Axis title or mutator to modify existing one
Axis itself for fluent interface
Set font of Axis title.
FontSettings or mutator function for existing settings
Object itself
Specifies padding after Axis title. This is only accounted when title is visible.
Gap between the title and the next axis in pixels. Can also affect chart margins
Axis itself for fluent interface
Stop scrolling of axis until restored.
Axis is a child component of ChartXY. It defines a numeric range on a single plane (X or Y), that will be used to scale attached Series to the ChartXYs viewport.
A ChartXY can have any number of Axes. They can be positioned on all four sides of the ChartXY:
Axes have automatic scrolling logic to fit attached Series. This can be modified with Axis.setScrollStrategy
Axes are associated with a title, which can be enabled with Axis.setTitle