DataItem

Type class

A base element that holds data bit (data item) for any Component.

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

@todo requires description

close
#

Type object | undefined

A set of "close" values.

component
#

Type Component

A data item's owener Component.

dataContext
#

Type unknown

A reference to actual item in source data this item is based on.

enableDispose
#

Type boolean

Default true

Inherited from Settings

If this is set to false then disposing does nothing, it's a no-op.

open
#

Type object | undefined

A set of "open" values.

uid
#

Type number

Default ++counter

Inherited from Settings

Unique ID.

There are 2 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

constructor(

component: Component,
dataContext: unknown,
settings: P

)

#

Returns DataItem

dispose()

#

Returns void

Inherited from Settings

Disposes this object.

get(

key: Key,
fallback: F

)

#

Returns NonNullable | F

Inherited from Settings

Returns settings value for the specified key.

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

Click here for more info

has(

key: Key

)

#

Returns boolean

Inherited from Settings

Returns true if the setting exists.

Click here for more info

hide(

duration?: undefined | number

)

#

Returns void

Hides a data item that's currently visible.

isDisposed()

#

Returns boolean

Inherited from Settings

Returns true if this element is disposed.

isHidden()

#

Returns boolean

off(

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

)

#

Returns void

Inherited from Settings

Removes a callback for when value of a setting changes.

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 debounced callback for when value of a setting changes.

Click here for more info

offDebouncedPrivate(

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

)

#

Returns void

Inherited from Settings

Removes a debounced callback for when value of a private setting changes.

Click here for more info

offPrivate(

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

)

#

Returns void

Inherited from Settings

Removes a callback for when value of a private setting changes.

Click here for more info
@since 5.9.2

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

onDebounced(

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

)

#

Returns IDisposer

Inherited from Settings

Sets a debounced callback function to invoke when specific key of settings changes or is set. The callback fires only once even if the setting is changed multiple times within the debounce delay.

Click here for more info

onPrivate(

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

)

#

Returns IDisposer

Inherited from Settings

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

Click here for more info

onPrivateDebounced(

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

)

#

Returns IDisposer

Inherited from Settings

Sets a debounced callback function to invoke when specific key of private settings changes or is set. The callback fires only once even if the setting is changed multiple times within the debounce delay.

Click here for more info

remove(

key: Key

)

#

Returns void

Inherited from Settings

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 Settings

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

show(

duration?: undefined | number

)

#

Returns void

Shows a data item that's currently hidden.

There are 17 inherited items currently hidden from this list.

Events

DataItem does not have any events.