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 the Axis value
Custom tick strategy for axis. Defines positioning and formating of ticks.
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:
Desired result | Value |
---|---|
Custom tick with default background | undefined |
Custom tick with no background | 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.
All animations have to be re-enabled individually if you wish to re-enable animations.
Chart 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 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 style of Axis Ticks.
TickStyle object
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
Pan scale by pixel value delta.
Amount to shift scale of axis in pixels
Undo effects of 'stop'.
Restore all Axis sub-elements and restore this Axis to the collection it was in.
this for fluent interface TODO: Needs to properly restore the nibs - or recreate them. Current dispose would force us to use the latter method. Needs to put the axis back to a proper position.
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 easing 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
this 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 AxisScrollStrategy of the Axis. This decides where axis scrolls based on current view and series boundaries.
AxisScrollStrategy or undefined to disable automatic scrolling. See AxisScrollStrategies for a collection of options.
Axis for fluent interface
Specifies axis stroke
Axis stroke style
Axis itself for fluent interface
Set style of Axis Ticks.
Example usage:
Desired result | Argument |
---|---|
Specified TickStyle | new VisibleTicks({ labelFillStyle: new SolidFill({ color: ColorHEX('#F00'), tickLength: 8 }) }) |
Changed label fill style | (visibleTicks) => visibleTicks.setLabelFillStyle(new SolidFill({ color: ColorHEX('#F00') })) |
Hidden | emptyTick |
Either a TickStyle object or a function, which will be used to create a new TickStyle based on current value.
Chart itself
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.
Zoom scale from/to a position.
Position to zoom towards or from on axis
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