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.
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 animations disable/enable state.
Animations default state.
Get the currently applied axis scale interval.
Object containing the current start and end of Axis.
Current AxisScrollStrategy
Style of Axis line.
Get the currently used tick strategy
Axis title string
Axis title fillstyle
Get font of axis labels.
FontSettings
Get rotation of Axis title.
Rotation in degrees
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
The onScaleChange event triggers on change of the interval of an Axis and accept a callback function with 2 parameters that return start and end values of the Axis
Example usage:
Axis.onScaleChange((start, end) => {
console.log(`start value: ${start}, end value : ${end}`);
}
)
Event listener
Token that is used to unsubscribe from the event
Undo effects of 'stop'.
Specifies scroll animation. Scroll animations can cause slow-downs with 3D charts with large amounts of data shown in the 3D chart.
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 'common/animator.Easings' for defaults
Optional default duration for zooming animations in milliseconds
Disable/Enable all animations of the Chart.
Boolean value to enable/disable animations.
Axis itself for fluent interface.
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
Enable / disable all interactions of Axis.
Interactions enabled or not.
Object itself for fluent interface.
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.
Set style of Axis line.
A LineStyle object, or a function which modifies the current style.
Object 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 |
'Time' | ( tickStrategy: TimeTickStrategy ) => 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
Set rotation of Axis title.
Rotation in degrees
Object itself
Stop scrolling of axis until restored.
Three-dimensional Axis, that resides inside Chart3D. Can be either X, Y or Z. There is always exactly one Axis3D object for each dimension in a Chart3D.
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()