DataItem

Type class

One item of a Component's data, holding its values and settings.

Sources

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

// Import DataItem
import * as am5 from "@amcharts/amcharts5";

// Create DataItem
am5.DataItem.new(root, {
  // ... config if applicable
});
<!-- Load DataItem -->
<script src="index.js"></script>

<script>
// Create DataItem
am5.DataItem.new(root, {
  // ... config if applicable
});
</script>

Inheritance

DataItem extends Settings.

DataItem is not extended by any other symbol.

Settings

DataItem does not have any settings.

Private settings

DataItem does not have any private settings.

Properties

bullets
#

Type Array | undefined

Bullets shown for this data item.

close
#

Type object | undefined

End of the base interval each date field's value falls in, by field.

Set by a DateAxis.

component
#

Type Component

The Component the data item belongs to.

dataContext
#

Type unknown

The object in the source data this data item was made from.

enableDispose
#

Type boolean

Default true

Inherited from Settings

Set to false to make dispose() do nothing.

open
#

Type object | undefined

Start of the base interval each date field's value falls in, by field.

Set by a DateAxis.

uid
#

Type number

Default ++counter

Inherited from Settings

A unique number, given to each object as it is created.

There are 2 inherited items currently hidden from this list.

Methods

animate(

options: AnimationOptions

)

#

Returns Animation

Inherited from Settings

Animates a setting from its current value (or from) to to. The setting jumps to from at once. With duration 0, or no value to start from, it is set to to at once and the returned animation is already stopped.

Click here for more info

constructor(

component: Component,
dataContext: unknown,
settings: P

)

#

Returns DataItem

dispose()

#

Returns void

Inherited from Settings

Disposes the object, freeing everything it holds. A disposed object can't be used again.

get(

key: Key,
fallback: F

)

#

Returns NonNullable | F

Inherited from Settings

Returns the value of setting key, or fallback if it is not set.

Click here for more info

has(

key: Key

)

#

Returns boolean

Inherited from Settings

Returns true if setting key is set.

Click here for more info

hide(

duration?: undefined | number

)

#

Returns void

Hides the data item.

isDisposed()

#

Returns boolean

Inherited from Settings

Returns true if the object has been disposed.

isHidden()

#

Returns boolean

Returns true if the data item is hidden.

off(

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

)

#

Returns void

Inherited from Settings

Removes a callback added with on(). Without callback, removes all of them for key.

Click here for more info
@since 5.9.2

offDebounced(

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

)

#

Returns void

Inherited from Settings

Removes a callback added with onDebounced(). Without callback, removes all of them for key.

Click here for more info

offDebouncedPrivate(

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

)

#

Returns void

Inherited from Settings

Removes a callback added with onPrivateDebounced(). Without callback, removes all of them for key.

Click here for more info

offPrivate(

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

)

#

Returns void

Inherited from Settings

Removes a callback added with onPrivate(). Without callback, removes all of them for key.

Click here for more info
@since 5.9.2

on(

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

)

#

Returns IDisposer

Inherited from Settings

Calls callback each time the value of setting key changes or is removed. Setting the same value again does not call it.

Click here for more info

onDebounced(

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

)

#

Returns IDisposer

Inherited from Settings

Like on(), but waits until setting key has not changed for debounceDelay milliseconds, then calls callback once with the latest value.

Click here for more info

onPrivate(

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

)

#

Returns IDisposer

Inherited from Settings

Calls callback each time the value of private setting key changes.

Click here for more info

onPrivateDebounced(

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

)

#

Returns IDisposer

Inherited from Settings

Like onPrivate(), but waits until private setting key has not changed for debounceDelay milliseconds, then calls callback once with the latest value.

Click here for more info

once(

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

)

#

Returns IDisposer

Inherited from Settings

Like on(), but the callback is removed after it is called once.

Click here for more info
@since 5.20.4

onceDebounced(

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

)

#

Returns IDisposer

Inherited from Settings

Like onDebounced(), but the callback is removed after it is called once.

Click here for more info
@since 5.20.4

remove(

key: Key

)

#

Returns void

Inherited from Settings

Removes the value of setting key.

Click here for more info

removeAll()

#

Returns void

Inherited from Settings

Removes all settings, as remove() does for each one.

Click here for more info

set(

key: Key,
value: Value

)

#

Returns Value

Inherited from Settings

Sets setting key to value and returns value. Stops any animation of that setting.

Click here for more info

setAll(

settings: Partial

)

#

Returns void

Inherited from Settings

Sets several settings at once, from an object of key-value pairs.

Click here for more info

show(

duration?: undefined | number

)

#

Returns void

Shows the data item.

There are 19 inherited items currently hidden from this list.

Events

DataItem does not have any events.