Reference – amCharts 5 Documentation https://www.amcharts.com/docs/v5 Mon, 25 Oct 2021 15:29:28 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.1 https://www.amcharts.com/docs/v5/wp-content/uploads/sites/7/2021/06/favicon-128.png Reference – amCharts 5 Documentation https://www.amcharts.com/docs/v5 32 32 Adapters https://www.amcharts.com/docs/v5/reference/adapters/ Tue, 28 Sep 2021 06:14:29 +0000 https://www.amcharts.com/docs/v5/reference/adapters/ Type class

Allows to dynamically modify setting value of its target element.

Click here for more info

Sources

This information about Adapters is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

Adapters does not extend any other symbol.

Adapters is not extended by any other symbol.

Settings

Adapters does not have any settings.

Private settings

Adapters does not have any private settings.

Properties

Adapters does not have any properties.

Methods

add(

key: Key,
callback: ( value: O[""], target: O, key: Key) => O[""]

)

#

Returns IDisposer

Add a function (callback) that will modify value for setting key.

Click here for more info

constructor(

entity: E

)

#

Returns Adapters

disable(

key: Key

)

#

Returns void

Disables all adapters for specific key.

@since 5.1.0

enable(

key: Key

)

#

Returns void

Enables (previously disabled) adapters for specific key.

@since 5.1.0

remove(

key: Key

)

#

Returns void

Removes all adapters for the specific key.

@since 5.1.0

Events

Adapters does not have any events.

]]>
Animated https://www.amcharts.com/docs/v5/reference/animated/ Tue, 28 Sep 2021 06:16:59 +0000 https://www.amcharts.com/docs/v5/reference/animated/ Type object

Sources

This information about Animated is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

Animated does not extend any other symbol.

Animated is not extended by any other symbol.

Properties

Animated does not have any properties.

]]>
Animation https://www.amcharts.com/docs/v5/reference/animation/ Tue, 28 Sep 2021 06:15:07 +0000 https://www.amcharts.com/docs/v5/reference/animation/ Type class

Animation object.

Click here for more info

Sources

This information about Animation is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

Animation does not extend any other symbol.

Animation is not extended by any other symbol.

Settings

Animation does not have any settings.

Private settings

Animation does not have any private settings.

Properties

events
#

Type EventDispatcher

Default new EventDispatcher()

from
#

Type Value

percentage
#

Type Time

playing
#

Type boolean

stopped
#

Type boolean

to
#

Type Value

Methods

constructor(

from: Value,
to: Value,
duration: number,
easing: $ease.Easing,
loops: number,
startingTime: number | null

)

#

Returns Animation

pause()

#

Returns void

play()

#

Returns void

stop()

#

Returns void

waitForStop()

#

Returns Promise

Events

Add event handlers to Animation object using its events.on() method.

Read about adding event handlers.

#stopped

Param { type: "stopped",
  target: this }

Invoked when animation was stopped, which happens in these situations:

1. When the animation reached the end.

2. When the stop() method is called.

3. When a new animation starts for the same key.

4. When calling set for the same key.

]]>
AnimationOptions https://www.amcharts.com/docs/v5/reference/animationoptions/ Tue, 28 Sep 2021 06:14:49 +0000 https://www.amcharts.com/docs/v5/reference/animationoptions/ Type interface

Animation options.

Click here for more info

Inheritance

AnimationOptions does not extend any other symbol.

AnimationOptions is not extended by any other symbol.

Properties

duration
#

Type number

Animation duration in milliseconds.

easing
#

Type $ease.Easing

Easing function. Defaults to linear.

Click here for more info

from
#

Type Value

Initial value to animate from. If not set, will use current value.

key
#

Type Key

A setting key to animate value for.

loops
#

Type undefined | number

How many times to play the animation. Defaults to 1.

to
#

Type Value

Target value to animate to.

]]>
Animations https://www.amcharts.com/docs/v5/reference/animations/ Tue, 28 Sep 2021 06:16:59 +0000 https://www.amcharts.com/docs/v5/reference/animations/ Type object

Sources

This information about Animations is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

Animations does not extend any other symbol.

Animations is not extended by any other symbol.

Properties

Animations does not have any properties.

]]>
Annotator https://www.amcharts.com/docs/v5/reference/annotator/ Mon, 25 Oct 2021 15:29:28 +0000 https://www.amcharts.com/docs/v5/reference/annotator/ Type class

A plugin that can be used to annotate charts.

Click here for more info

Sources

Annotator can be used (imported) via one of the following packages.

// Annotator is available in all of the following modules.
// You only need to import one of them.

/**
 * --------------------------------------------------------
 * Import from: "plugins/exporting.ts"
 * Use like: am5plugins_exporting.Annotator
 * --------------------------------------------------------
 */
import * as am5plugins_exporting from "@amcharts/amcharts5/plugins/exporting";

// Annotator is available in all of the following modules.
// You only need to import one of them.

/**
 * --------------------------------------------------------
 * Include via: <script src="plugins/exporting.js"></script>
 * Access items like: am5plugins_exporting.Annotator
 * --------------------------------------------------------
 */

Inheritance

Annotator extends Entity.

Annotator is not extended by any other symbol.

Settings

Set these settings on a Annotator object using its set() and setAll() methods.

Read about settings concept.

id
#

Type undefined | string

Inherited from IEntitySettings

A custom string ID for the element.

If set, element can be looked up via am5.registry.entitiesById.

Will raise error if an element with the same ID already exists.

layer
#

Type undefined | number

Default 1000

Layer number to use for annotations.

markerState
#

Type any

Raw annotation info saved by MarkerJS.

stateAnimationDuration
#

Type undefined | number

Inherited from IEntitySettings

Duration of transition from one state to another.

stateAnimationEasing
#

Type $ease.Easing

Inherited from IEntitySettings

Easing of transition from one state to another.

themeTags
#

Type Array

Inherited from IEntitySettings

Tags which can be used by the theme rules.

Click here for more info

themeTagsSelf
#

Type Array

Inherited from IEntitySettings

Tags which can be used by the theme rules.

These tags only apply to this object, not any children.

Click here for more info

themes
#

Type Array

Inherited from IEntitySettings

A list of themes applied to the element.

userData
#

Type any

Inherited from IEntitySettings

A storage for any custom user data that needs to be associated with the element.

There are 7 inherited items currently hidden from this list.

Private settings

Properties

adapters
#

Type Adapters

Default new Adapters(this)

Inherited from Entity

className
#

Static

Type string

Default "Annotator"

classNames
#

Static

Type Array

Default "Annotator", "Entity"

events
#

Type EventDispatcher

Default this._createEvents()

Inherited from Entity

root
#

Type Root

Inherited from Entity

An instance of Root object.

@readonly
@since 5.0.6

states
#

Type States

Default new States(this)

Inherited from Entity

template
#

Type Template | undefined

Inherited from Entity

@todo needs description

uid
#

Type number

Default ++counter

Inherited from Settings

Unique ID.

There are 6 inherited items currently hidden from this list.

Methods

animate(

options: AnimationOptions

)

#

Returns Animation

Inherited from Settings

Animates setting values from current/start values to new ones.

Click here for more info

cancel()

#

Returns Promise

Exits from annotation mode. Any changes made during last session of the annotation editing are cancelled.

clear()

#

Returns void

All annotations are removed.

close()

#

Returns Promise

Exists from annotation mode. All annotations remain visible on the chart.

dispose()

#

Returns void

get(

key: Key,
fallback: F

)

#

Returns NonNullable | F

Inherited from Entity

Returns settings value for the specified key.

If there is no value, fallback is returned instead (if set).

Click here for more info

getMarkerArea()

#

Returns Promise

An instance of MarkerJS's MarkerArea.

Click here for more info

isDisposed()

#

Returns boolean

Inherited from Settings

Returns true if this element is disposed.

isType(

type: string

)

#

Returns this

Inherited from Entity

Checks if element is of certain class (or inherits one).

new(

root: Root,
settings: ITSettings,
template?: Template

)

#

Static

Returns T

Inherited from Entity

Use this method to create an instance of this class.

Click here for more info

on(

key: Key,
callback: ( value: [""], target: this, key: Key) => void

)

#

Returns IDisposer

Inherited from Settings

Sets a callback function to invoke when specific key of settings changes or is set.

Click here for more info

open()

#

Returns Promise

Triggers annotation mode on the chart. This will display UI toolbars and disable all interactions on the chart itself.

remove(

key: Key

)

#

Returns void

Inherited from Entity

Removes a setting value for the specified key.

Click here for more info

removeAll()

#

Returns void

Inherited from Settings

Removes all keys;

Click here for more info

set(

key: Key,
value: Value

)

#

Returns Value

Inherited from Entity

Sets a setting value for the specified key, and returns the same value.

Click here for more info

setAll(

settings: Partial

)

#

Returns void

Inherited from Settings

Sets multiple settings at once.

settings must be an object with key: value pairs.

Click here for more info

setTimeout(

fn: () => void,
delay: number

)

#

Returns IDisposer

Inherited from Entity

Creates and returns a "disposable" timeout.

toggle()

#

Returns Promise

There are 11 inherited items currently hidden from this list.

Events

Annotator does not have any events.

]]>
ApplyState https://www.amcharts.com/docs/v5/reference/applystate/ Tue, 28 Sep 2021 06:14:49 +0000 https://www.amcharts.com/docs/v5/reference/applystate/ Type interface

Inheritance

ApplyState does not extend any other symbol.

ApplyState is not extended by any other symbol.

Properties

privateSettings
#

Type Dirty

settings
#

Type Dirty

states
#

Type object

]]>
AriaLive https://www.amcharts.com/docs/v5/reference/arialive/ Tue, 28 Sep 2021 06:16:59 +0000 https://www.amcharts.com/docs/v5/reference/arialive/ Type "off" | "polite" | "assertive"

Available options for aria-live attribute

Sources

This information about AriaLive is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

AriaLive does not extend any other symbol.

AriaLive is not extended by any other symbol.

Properties

AriaLive does not have any properties.

]]>
Array https://www.amcharts.com/docs/v5/reference/array_module/ Tue, 28 Sep 2021 06:17:10 +0000 https://www.amcharts.com/docs/v5/reference/array_module/ Type module

Sources

Items from Array can be imported/included and used via following ways.

/**
 * --------------------------------------------------------
 * Import via main package: core.ts
 * Access items like: am5.array.myVariable
 *                    am5.array.myFunction()
 * --------------------------------------------------------
 */
import * as am5 from "@amcharts/amcharts4";

/**
 * --------------------------------------------------------
 * Import via: Array.ts
 * Access items like: $array.myVariable
 *                    $array.myFunction()
 * --------------------------------------------------------
 */
import * as $array from "@amcharts/amcharts5/Array";

/**
 * --------------------------------------------------------
 * Include via "index.js"
 * E.g.: "https://cdn.amcharts.com/lib/5/index.js"
 * Access items like: am5.array.myVariable
 *                    am5.array.myFunction()
 * --------------------------------------------------------
 */

Variables

Array does not have any variables.

Functions

add(

array: Array,
element: A,
index?: undefined | number

)

#

Returns void

Adds count of time unit to the source date. Returns a modified Date object.

any(

array: ArrayLike,
test: ( value: A) => boolean

)

#

Returns boolean

Calls test for each element in array.

If test returns true then it immediately returns true.

If test returns false for all of the elements in array then it returns false.

copy(

array: ArrayLike

)

#

Returns Array

Returns a copy of the Date object.

each(

array: ArrayLike,
fn: ( value: A, index: number) => void

)

#

Returns void

Iterates through all items in array and calls fn function for each of them.

eachContinue(

array: ArrayLike,
fn: ( value: A, index: number) => boolean

)

#

Returns void

Iterates through all properties of the object calling fn for each of them.

If return value of the function evaluates to false further iteration is cancelled.

eachReverse(

array: ArrayLike,
fn: ( value: A, index: number) => void

)

#

Returns void

Iterates through all items in array in reverse order and calls fn function for each of them.

find(

array: ArrayLike,
matches: ( value: A, index: number) => boolean

)

#

Returns A | undefined

Searches the array using custom function and returns item if found.

Will call matches function on all items of the array. If return value evaluates to true, index is returned.

Otherwise returns undefined.

findIndex(

array: ArrayLike,
matches: ( value: A, index: number) => boolean

)

#

Returns number

Searches the array using custom function and returns index of the item if found.

Will call matches function on all items of the array. If return value evaluates to true, index is returned.

Otherwise returns -1.

findIndexReverse(

array: ArrayLike,
matches: ( value: A, index: number) => boolean

)

#

Returns number

This is the same as findIndex except it searches from right to left.

findMap(

array: ArrayLike,
matches: ( value: A, index: number) => B | undefined

)

#

Returns B | undefined

Searches the array using custom function and returns item if found.

Will call matches function on all items of the array. If value is not undefined, it returns it.

Otherwise returns undefined.

findReverse(

array: ArrayLike,
matches: ( value: A, index: number) => boolean

)

#

Returns A | undefined

This is the same as find except it searches from right to left.

first(

array: Array

)

#

Returns Optional

Returns the first item of the array.

has(

array: ArrayLike,
element: A

)

#

Returns boolean

Returns true if element exists in array.

indexOf(

array: ArrayLike,
value: A

)

#

Returns number

Searches array for value.

Returns -1 if not found.

insert(

array: Array,
element: A,
index: number

)

#

Returns void

Inserts element into array at index.

Caps index to be between 0 and array.length

insertIndex(

array: Array,
index: number,
value: A

)

#

Returns void

Inserts a value into array at specific index.

keepIf(

array: Array,
keep: ( value: A) => boolean

)

#

Returns void

last(

array: Array

)

#

Returns Optional

Returns the last item of the array.

map(

array: ArrayLike,
fn: ( value: A, index: number) => B

)

#

Returns Array

Calls fn function for every member of array and returns a new array out of all outputs.

move(

array: Array,
element: A,
toIndex?: undefined | number

)

#

Returns void

Adds an element to array.

If array already contains and item like this, it is removed before adding it again.

Optionally toIndex can be specified to add element at specific index.

pushAll(

array: Array,
input: Array

)

#

Returns void

Pushes all of the elements from input into array.

pushOne(

array: Array,
element: A

)

#

Returns void

Pushes element into array if it doesn't already exist.

remove(

array: Array,
element: A

)

#

Returns boolean

Removes element from array.

If there are multiple copies of element, they are all removed.

removeFirst(

array: Array,
element: A

)

#

Returns boolean

removeIndex(

array: Array,
index: number

)

#

Returns void

Removes a value from array at specific index.

replace(

array: Array,
element: A,
index?: undefined | number

)

#

Returns void

Removes element from array (if it exists) and then inserts element at index.

If index is not provided, it will insert element at the end of array.

setIndex(

array: Array,
element: A,
index: number

)

#

Returns void

Removes all copies of element from array (if they exist) and then inserts element at index.

shiftLeft(

array: Array,
index: number

)

#

Returns void

Shifts an item at index towards beginning of the array.

shuffle(

array: Array

)

#

Returns void

Iterates through all items in array and calls fn function for each of them.

slice(

array: ArrayLike,
start: number,
end: number

)

#

Returns Array

Returns a copy of array which contains all the elements between start and end. (including start and excluding end)If end is not provided, it defaults to array.length.

toArray(

input: Array | A

)

#

Returns Array

Wraps input in an array, if it isn't already an array.

]]>
Axis https://www.amcharts.com/docs/v5/reference/axis/ Tue, 28 Sep 2021 06:15:38 +0000 https://www.amcharts.com/docs/v5/reference/axis/ Type class

A base class for all axes.

Click here for more info

Sources

Axis can be used (imported) via one of the following packages.

// Axis is available in all of the following modules.
// You only need to import one of them.

/**
 * --------------------------------------------------------
 * Import from: "xy.ts"
 * Use like: am5xy.Axis
 * --------------------------------------------------------
 */
import * as am5xy from "@amcharts/amcharts5/xy";

// Axis is available in all of the following modules.
// You only need to import one of them.

/**
 * --------------------------------------------------------
 * Include via: <script src="xy.js"></script>
 * Access items like: am5xy.Axis
 * --------------------------------------------------------
 */

Inheritance

Axis extends Component.

Axis is extended by CategoryAxis, ValueAxis.

Settings

Set these settings on a Axis object using its set() and setAll() methods.

Read about settings concept.

active
#

Type undefined | false | true

Inherited from ISpriteSettings

Indicates if element is currently active.

background
#

Type Graphics

Inherited from IContainerSettings

Background element.

Click here for more info

baseValue
#

Type undefined | number

Base value of the axis.

bullet
#

Type undefined | ( root: Root, axis: Axis, dataItem: DataItem) => AxisBullet

A function that will be used to create bullets on each cell.

Click here for more info

centerX
#

Type number | Percent

Inherited from ISpriteSettings

X coordinate of the center of the element relative to itself.

Center coordinates will affect placement as well as rotation pivot point.

centerY
#

Type number | Percent

Inherited from ISpriteSettings

Y coordinate of the center of the element relative to itself.

Center coordinates will affect placement as well as rotation pivot point.

cursorOverStyle
#

Type undefined | string

Inherited from ISpriteSettings

A named mouse cursor style to show when hovering this element.

Click here for more info

dateFormatter
#

Type DateFormatter | undefined

Inherited from ISpriteSettings

An instance of DateFormatter that should be used instead of global formatter object.

Click here for more info

disabled
#

Type undefined | false | true

Inherited from ISpriteSettings

Indicates if element is disabled.

draggable
#

Type undefined | false | true

Inherited from ISpriteSettings

If set to true, user will be able to drag this element. It will also disable default drag events over the area of this element.

durationFormatter
#

Type DurationFormatter | undefined

Inherited from ISpriteSettings

An instance of DurationFormatter that should be used instead of global formatter object.

Click here for more info

dx
#

Type undefined | number

Inherited from ISpriteSettings

Horizontal shift in pixels. Can be negative to shift leftward.

dy
#

Type undefined | number

Inherited from ISpriteSettings

Vertical shift in pixels. Can be negative to shift upward.

end
#

Type undefined | number

The initial relative zoom end position of the axis.

E.g. stting it to 0.9 will pre-zoom axis to 10% from the end.

Click here for more info

exportable
#

Type undefined | false | true

Inherited from ISpriteSettings

If set to false this element will not appear in exported snapshots of the chart.

fixAxisSize
#

Type undefined | false | true

Default true

If set to true (default) the axis width will stay constant across all zooms, even if actual length of all visible labels changes.

forceHidden
#

Type undefined | false | true

Inherited from ISpriteSettings

If set to true the element will be hidden regardless of visible or even if show() is called.

forceInactive
#

Type undefined | false | true

Inherited from ISpriteSettings

If set to true the element will be inactive - absolutely oblivious to all interactions, even if there are related events set, or the interactive: true is set.

@since 5.0.21

height
#

Type number | Percent | null

Inherited from ISpriteSettings

Element's absolute height in pixels (numeric value) or relative height to parent (Percent);

id
#

Type undefined | string

Inherited from IEntitySettings

A custom string ID for the element.

If set, element can be looked up via am5.registry.entitiesById.

Will raise error if an element with the same ID already exists.

interactive
#

Type undefined | false | true

Inherited from ISpriteSettings

Should this element accept user interaction events?

interactiveChildren
#

Type undefined | false | true

Inherited from IContainerSettings

If set to true all descendants - not just direct children, but every element in it - will become "interactive".

interpolationDuration
#

Type undefined | number

Inherited from IComponentSettings

A duration of the animation from one setting value to another, in milliseconds.

Click here for more info

interpolationEasing
#

Type $ease.Easing

Inherited from IComponentSettings

Easing function to use for cross setting value animations.

Click here for more info

isMeasured
#

Type undefined | false | true

Inherited from ISpriteSettings

If set to false element will not be measured and cannot participate in layout schemes.

layer
#

Type undefined | number

Inherited from ISpriteSettings

Numeric layer to put element in.

Elements with higher number will appear in front of the ones with lower numer.

If not set, will inherit layer from its ascendants.

layout
#

Type Layout | null

Inherited from IContainerSettings

A method to layout

Click here for more info

marginBottom
#

Type undefined | number

Inherited from ISpriteSettings

Bottom margin in pixels.

marginLeft
#

Type undefined | number

Inherited from ISpriteSettings

Left margin in pixels.

marginRight
#

Type undefined | number

Inherited from ISpriteSettings

Right margin in pixels.

marginTop
#

Type undefined | number

Inherited from ISpriteSettings

Top margin in pixels.

mask
#

Type Graphics | null

Inherited from IContainerSettings

An element to use as a container's mask (clipping region).

Click here for more info

maskContent
#

Type undefined | false | true

Inherited from IContainerSettings

If set to true all content going outside the bounds of the container will be clipped.

maxDeviation
#

Type undefined | number

Default 0.1

A relative distance the axis is allowed to be zoomed/panned beyond its actual scope.

Click here for more info

maxHeight
#

Type number | null

Inherited from ISpriteSettings

Maximum allowed height in pixels.

maxWidth
#

Type number | null

Inherited from ISpriteSettings

Maximum allowed width in pixels.

maxZoomCount
#

Type undefined | number

Maximum number of axis elements to show at a time.

E.g. for a CategoryAxis that would be number of categories.

For a DateAxis it would be number of baseInterval.

The axis will not allow to be zoomed out beyond this number.

Click here for more info

maxZoomFactor
#

Type undefined | number

Default 1000

Maximum number of times the scope of the axis could auto-zoom-in.

This is to prevent axis jumping too drastically when scrolling/zooming.

minHeight
#

Type number | null

Inherited from ISpriteSettings

Minimum allowed height in pixels.

minWidth
#

Type number | null

Inherited from ISpriteSettings

Minimum allowed width in pixels.

minZoomCount
#

Type undefined | number

Minimum number of axis elements to show at a time.

E.g. for a CategoryAxis that would be number of categories.

For a DateAxis it would be number of baseInterval.

The axis will not allow to be zoomed in beyond this number.

Click here for more info

numberFormatter
#

Type NumberFormatter | undefined

Inherited from ISpriteSettings

An instance of NumberFormatter that should be used instead of global formatter object.

Click here for more info

opacity
#

Type undefined | number

Inherited from ISpriteSettings

Opacity. 0 - fully transparent; 1 - fully opaque.

paddingBottom
#

Type undefined | number

Inherited from IContainerSettings

Bottom padding in pixels.

paddingLeft
#

Type undefined | number

Inherited from IContainerSettings

Left padding in pixels.

paddingRight
#

Type undefined | number

Inherited from IContainerSettings

Right padding in pixels.

paddingTop
#

Type undefined | number

Inherited from IContainerSettings

Top padding in pixels.

panX
#

Type undefined | false | true

If set to false the axis will be exempt when chart is panned horizontally, and will keep its current position.`

Click here for more info

panY
#

Type undefined | false | true

If set to false the axis will be exempt when chart is panned vertically, and will keep its current position.`

Click here for more info

position
#

Type "absolute" | "relative"

Inherited from ISpriteSettings

Positioning of the element.

"absolute" means element will not participate in parent layout scheme, and will be positioned solely accoridng its x and y settings.

renderer
#

Type R

A renderer object which is responsible of rendering visible axis elements.

Click here for more info

reverseChildren
#

Type undefined | false | true

Inherited from IContainerSettings

If set to true its children will be laid out in opposite order.

@since 5.1.1

rotation
#

Type undefined | number

Inherited from ISpriteSettings

Rotation in degrees.

scale
#

Type undefined | number

Inherited from ISpriteSettings

Scale.

Setting to a value less than 1 will shrink object.

setStateOnChildren
#

Type undefined | false | true

Inherited from IContainerSettings

If set to true, applying a state on a container will also apply the same state on its children.

Click here for more info

showTooltipOn
#

Type "hover" | "always"

Default "hover"

Inherited from ISpriteSettings

Defines when tooltip is shown over the element.

Available options:

  • "hover" (default) - tooltip is shown when element is hovered by a pointer or touched. It is hidden as soon as element is not hovered anymore, or touch occurs outside it.
  • "always" - a tooltip will always be shown over the element, without any interactions. Please note that if you need to show tooltips for multiple elements at the same time, you need to explicitly create a Tooltip instance and set element's tooltip setting with it.

Click here for more info
@since 5.0.16

snapTooltip
#

Type undefined | false | true

Default true

Should tooltip snap to the tooltipLocation (true) or follow cursor.

start
#

Type undefined | number

The initial relative zoom start position of the axis.

E.g. stting it to 0.1 will pre-zoom axis to 10% from the start.

Click here for more info

stateAnimationDuration
#

Type undefined | number

Inherited from IEntitySettings

Duration of transition from one state to another.

stateAnimationEasing
#

Type $ease.Easing

Inherited from IEntitySettings

Easing of transition from one state to another.

templateField
#

Type undefined | string

Inherited from ISpriteSettings

Allows binding element's settings to data.

Click here for more info

themeTags
#

Type Array

Inherited from IEntitySettings

Tags which can be used by the theme rules.

Click here for more info

themeTagsSelf
#

Type Array

Inherited from IEntitySettings

Tags which can be used by the theme rules.

These tags only apply to this object, not any children.

Click here for more info

themes
#

Type Array

Inherited from IEntitySettings

A list of themes applied to the element.

toggleKey
#

Type "disabled" | "active" | "none" | undefined

Inherited from ISpriteSettings

If set, element will toggle specified boolean setting between true and false when clicked/touched.

tooltip
#

Type Tooltip

Tooltip element to use for axis.

tooltipLocation
#

Type undefined | number

Default 0.5

tooltipLocation indicates which relative place to snap to: 0 beginning, 0.5 - middle, 1 - end.

tooltipPosition
#

Type "fixed" | "pointer"

Inherited from ISpriteSettings

Tooltip position.

tooltipText
#

Type undefined | string

Inherited from ISpriteSettings

Text to show in a tooltip when hovered.

tooltipX
#

Type number | Percent

Inherited from ISpriteSettings

Tooltip pointer X coordinate relative to the element itself.

tooltipY
#

Type number | Percent

Inherited from ISpriteSettings

Tooltip pointer Y coordinate relative to the element itself.

userData
#

Type any

Inherited from IEntitySettings

A storage for any custom user data that needs to be associated with the element.

verticalScrollbar
#

Type Scrollbar

Inherited from IContainerSettings

Setting this to an instance of Scrollbar will enable vertical scrolling of content if it does not fit into the Container.

Click here for more info

visible
#

Type undefined | false | true

Inherited from ISpriteSettings

Is element visible?

wheelable
#

Type undefined | false | true

Inherited from ISpriteSettings

If set to true, mouse wheel events will be triggered over the element. It will also disable page scrolling using mouse wheel when pointer is over the element.

width
#

Type number | Percent | null

Inherited from ISpriteSettings

Element's absolute width in pixels (numeric value) or relative width to parent (Percent);

x
#

Type number | Percent | null

Inherited from ISpriteSettings

X position relative to parent.

y
#

Type number | Percent | null

Inherited from ISpriteSettings

Y position relative to parent.

zoomX
#

Type undefined | false | true

If set to false the axis will be exempt when chart is zoomed horizontally, and will keep its current zoom/position.`

Click here for more info

zoomY
#

Type undefined | false | true

If set to false the axis will be exempt when chart is zoomed vertically, and will keep its current zoom/position.`

Click here for more info

There are 63 inherited items currently hidden from this list.

Private settings

These are read-only settings accessible from a Axis object using its getPrivate() method.

Read about private settings.

showingTooltip
#

Read only

Type undefined | false | true

Inherited from ISpritePrivate

Is element currently showing a tooltip?

tooltipTarget
#

Read only

Type Graphics

Inherited from ISpritePrivate

An element tooltip should inherit its colors from.

There are 2 inherited items currently hidden from this list.

Properties

adapters
#

Type Adapters

Default new Adapters(this)

Inherited from Entity

axisHeader
#

Type Container

Default new Container

A container above the axis that can be used to add additional stuff into it. For example a legend, label, or an icon.

Click here for more info

axisRanges
#

Type List

Default new List()

A list of axis ranges.

Click here for more info

bulletsContainer
#

Type Container

Default new Container

A Container that holds all the axis bullet elements.

chart
#

Type XYChart | undefined

A referenece to the the chart the axis belongs to.

children
#

Type Children

Default new Children(this)

Inherited from Container

List of Container's child elements.

className
#

Static

Type string

Default "Axis"

classNames
#

Static

Type Array

Default "Axis", "Component", "Container", "Sprite", "Entity"

data
#

Type ListData

Inherited from Component

Component's data.

Click here for more info

dataItem
#

Type DataItem | undefined

Inherited from Sprite

A DataItem used for this element.

NOTE: data item is being assigned automatically in most cases where it matters. Use this accessor to set data item only if you know what you're doing.

dataItems
#

Type Array

Inherited from Component

A list of component's data items.

events
#

Type SpriteEventDispatcher

Inherited from Sprite

ghostLabel
#

Type AxisLabel

A control label that is invisible but is used to keep width the width of the axis constant.

gridContainer
#

Type Container

Default Container.new()

A Container that holds all the axis grid and fill elements.

inited
#

Type boolean

Default false

Inherited from Component

Indicates if the component has already been initialized.

labelsContainer
#

Type Container

Default Container.new()

A Container that holds all the axis label elements.

parent
#

Type Container | undefined

Inherited from Sprite

Parent Container of this element.

root
#

Type Root

Inherited from Entity

An instance of Root object.

@readonly
@since 5.0.6

series
#

Type Array

A list of series using this axis.

states
#

Type States

Default new States(this)

Inherited from Entity

template
#

Type Template | undefined

Inherited from Entity

@todo needs description

topGridContainer
#

Type Container

Default Container.new()

A Container that holds axis grid elements which goes above the series.

uid
#

Type number

Default ++counter

Inherited from Settings

Unique ID.

There are 12 inherited items currently hidden from this list.

Methods

allChildren()

#

Returns Array

Inherited from Container

animate(

options: AnimationOptions

)

#

Returns Animation

Inherited from Settings

Animates setting values from current/start values to new ones.

Click here for more info

appear(

duration?: undefined | number,
delay?: undefined | number

)

#

Returns Promise

Inherited from Sprite

Plays initial reveal animation regardless if element is currently hidden or visible.

coordinateToPosition(

coordinate: number

)

#

Returns number

Converts pixel coordinate to a relative position on axis.

createAxisRange(

axisDataItem: DataItem

)

#

Returns DataItem

Creates and returns an axis range object.

Click here for more info

depth()

#

Returns number

Inherited from Sprite

Returns depth (how deep in the hierachy of the content tree) of this element.

dispose()

#

Returns void

Inherited from Settings

Disposes this object.

eachChildren(

f: ( child: Sprite) => void

)

#

Returns void

Inherited from Container

get(

key: Key,
fallback: F

)

#

Returns NonNullable | F

Inherited from Entity

Returns settings value for the specified key.

If there is no value, fallback is returned instead (if set).

Click here for more info

getDateFormatter()

#

Returns DateFormatter

Inherited from Sprite

Returns an instance of DateFormatter used in this element.

If this element does not have it set, global one form Root is used.

Click here for more info

getDurationFormatter()

#

Returns DurationFormatter

Inherited from Sprite

Returns an instance of DurationFormatter used in this element.

If this element does not have it set, global one form Root is used.

Click here for more info

getNumberFormatter()

#

Returns NumberFormatter

Inherited from Sprite

Returns an instance of NumberFormatter used in this element.

If this element does not have it set, global one form Root is used.

Click here for more info

getSeriesItem(

series: XYSeries,
position: number

)

#

Returns DataItem | undefined

Returns a data item from series that is closest to the position.

getTooltip()

#

Returns Tooltip | undefined

Inherited from Sprite

Returns Tooltip used for this element.

getTooltipText(

position: number

)

#

Returns string | undefined

Returns text to be used in an axis tooltip for specific relative position.

height()

#

Returns number

Inherited from Sprite

Returns height of this element in pixels.

hide(

duration?: undefined | number

)

#

Returns Promise

Inherited from Sprite

Hides the element and returns a Promise which completes when all hiding animations are finished.

series.hide().then(function(ev) {
  console.log("Series finished hiding");
})
series.hide().then(function(ev) {
  console.log("Series finished hiding");
})

hideTooltip()

#

Returns void

Inherited from Sprite

Hides element's Tooltip.

hover()

#

Returns void

Inherited from Sprite

Simulate hover over element.

innerHeight()

#

Returns number

Inherited from Container

Returns container's inner height (height without padding) in pixels.

innerWidth()

#

Returns number

Inherited from Container

Returns container's inner width (width without padding) in pixels.

isDisposed()

#

Returns boolean

Inherited from Settings

Returns true if this element is disposed.

isDragging()

#

Returns boolean

Inherited from Sprite

Returns true if this element is currently being dragged.

isFocus()

#

Returns boolean

Inherited from Sprite

Returns true if this element does currently have focus.

isHidden()

#

Returns boolean

Inherited from Sprite

Returns true if this element is currently hidden.

isHiding()

#

Returns boolean

Inherited from Sprite

Returns true if this element is currently animating to a hidden state.

isHover()

#

Returns boolean

Inherited from Sprite

Returns true if this element is currently hovered by a pointer.

isShowing()

#

Returns boolean

Inherited from Sprite

Returns true if this element is currently animating to a default state.

isType(

type: string

)

#

Returns this

Inherited from Entity

Checks if element is of certain class (or inherits one).

markDirtyValues(

_dataItem?: DataItem

)

#

Returns void

Inherited from Component

Forces a repaint of the element which relies on data.

@since 5.0.21

maxHeight()

#

Returns number

Inherited from Sprite

Returns maximum allowed height of this element in pixels.

maxWidth()

#

Returns number

Inherited from Sprite

Returns maximum allowed width of this element in pixels.

new(

root: Root,
settings: ITSettings,
template?: Template

)

#

Static

Returns T

Inherited from Entity

Use this method to create an instance of this class.

Click here for more info

on(

key: Key,
callback: ( value: [""], target: this, key: Key) => void

)

#

Returns IDisposer

Inherited from Settings

Sets a callback function to invoke when specific key of settings changes or is set.

Click here for more info

remove(

key: Key

)

#

Returns void

Inherited from Entity

Removes a setting value for the specified key.

Click here for more info

removeAll()

#

Returns void

Inherited from Settings

Removes all keys;

Click here for more info

set(

key: Key,
value: Value

)

#

Returns Value

Inherited from Entity

Sets a setting value for the specified key, and returns the same value.

Click here for more info

setAll(

settings: Partial

)

#

Returns void

Inherited from Settings

Sets multiple settings at once.

settings must be an object with key: value pairs.

Click here for more info

setTimeout(

fn: () => void,
delay: number

)

#

Returns IDisposer

Inherited from Entity

Creates and returns a "disposable" timeout.

show(

duration?: undefined | number

)

#

Returns Promise

Inherited from Sprite

Shows currently hidden element and returns a Promise which completes when all showing animations are finished.

series.show().then(function(ev) {
  console.log("Series is now fully visible");
})
series.show().then(function(ev) {
  console.log("Series is now fully visible");
})

showTooltip(

point?: IPoint

)

#

Returns void

Inherited from Sprite

Shows element's Tooltip.

toAxisPosition(

position: number

)

#

Returns number

Converts relative position of the plot area to relative position of the axis with zoom taken into account.

toBack()

#

Returns void

Inherited from Sprite

Moves sprite to the beginning of the parent's children array.

Depending on layout setting of the parten container, it may effect the positioning or overlapping order of the elements.

toFront()

#

Returns void

Inherited from Sprite

Moves sprite to the end of the parent's children array.

Depending on layout setting of the parten container, it may effect the positioning or overlapping order of the elements.

toGlobal(

point: IPoint

)

#

Returns IPoint

Inherited from Sprite

Converts X/Y coordinate within this element to a global coordinate.

toLocal(

point: IPoint

)

#

Returns IPoint

Inherited from Sprite

Converts global X/Y coordinate to a coordinate within this element.

unhover()

#

Returns void

Inherited from Sprite

Simulate unhover over element.

updateTooltip()

#

Returns void

Can be called when axis zoom changes and you need to update tooltip position.

width()

#

Returns number

Inherited from Sprite

Returns width of this element in pixels.

x()

#

Returns number

Inherited from Sprite

Returns element's actual X position in pixels.

y()

#

Returns number

Inherited from Sprite

Returns element's actual Y position in pixels.

zoom(

start: number,
end: number,
duration?: undefined | number,
priority?: "start" | "end"

)

#

Returns Animation | Animation | undefined

Zooms the axis to relative locations.

Both start and end are relative: 0 means start of the axis, 1 - end.

There are 45 inherited items currently hidden from this list.

Events

Add event handlers to Axis object using its events.on() method.

Read about adding event handlers.

#blur

Param { originalEvent: FocusEvent,
  target: Sprite,
  type: "blur",
  target: this }

Inherited from ISpriteEvents

Invoked when element loses focus.

#boundschanged

Param { type: "boundschanged",
  target: this }

Inherited from ISpriteEvents

Invoked when element's bounds change due to any manipulation to it.

#click

Param { type: "click",
  target: this }

Inherited from ISpriteEvents

Invoked when element is clicked or tapped.

#dataitemchanged

Param { newDataItem: DataItem | undefined,
  oldDataItem: DataItem | undefined,
  type: "dataitemchanged",
  target: this }

Inherited from ISpriteEvents

Invoked when element's data item changes.

#datavalidated

Param { type: "datavalidated",
  target: this }

Inherited from IComponentEvents

#dblclick

Param { type: "dblclick",
  target: this }

Inherited from ISpriteEvents

Invoked when element is doubleclicked or tapped twice quickly.

#dragged

Param { type: "dragged",
  target: this }

Inherited from ISpriteEvents

Invoked when element ois being dragged.

#dragstart

Param { type: "dragstart",
  target: this }

Inherited from ISpriteEvents

Invoked when element dragging starts.

#dragstop

Param { type: "dragstop",
  target: this }

Inherited from ISpriteEvents

Invoked when element dragging stops.

#focus

Param { originalEvent: FocusEvent,
  target: Sprite,
  type: "focus",
  target: this }

Inherited from ISpriteEvents

Invoked when element gains focus.

#globalpointermove

Param { type: "globalpointermove",
  target: this }

Inherited from ISpriteEvents

Invoked when pointer is moving anywhere in the window, even outside of the element or even chart area.

#globalpointerup

Param { type: "globalpointerup",
  target: this }

Inherited from ISpriteEvents

Invoked when pointer button is released or touch stops in the window, even outside of the element or even chart area.

#middleclick

Param { type: "middleclick",
  target: this }

Inherited from ISpriteEvents

Invoked when element is clicked with the middle mouse button.

#pointerdown

Param { type: "pointerdown",
  target: this }

Inherited from ISpriteEvents

Invoked when pointer button is pressed or touch starts over the element.

#pointerout

Param { type: "pointerout",
  target: this }

Inherited from ISpriteEvents

Invoked when pointer moves outside the element.

#pointerover

Param { type: "pointerover",
  target: this }

Inherited from ISpriteEvents

Invoked when pointer moves over the element.

#pointerup

Param { type: "pointerup",
  target: this }

Inherited from ISpriteEvents

Invoked when pointer button is released or touch stops over the element.

#positionchanged

Param { type: "positionchanged",
  target: this }

Inherited from ISpriteEvents

Invoked when element's position (X/Y) changes.

#rightclick

Param { type: "rightclick",
  target: this }

Inherited from ISpriteEvents

Invoked when element is clicked width the right mouse button.

#wheel

Param { originalEvent: WheelEvent,
  point: IPoint,
  type: "wheel",
  target: this }

Inherited from ISpriteEvents

Invoked when mouse wheel is spinned while pointer is over the element.

There are 20 inherited items currently hidden from this list.
]]>