CandlestickSeriesDataItem

Type class

Defines a DataItem for CandlestickSeries.

@see DataItem

Sources

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

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

/**
 * --------------------------------------------------------
 * Import from: "charts.ts"
 * Use like: am4charts.CandlestickSeriesDataItem
 * --------------------------------------------------------
 */
import * as am4charts from "@amcharts/amcharts4/charts";

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

/**
 * --------------------------------------------------------
 * Include via: <script src="charts.js"></script>
 * Access items like: am4charts.CandlestickSeriesDataItem
 * --------------------------------------------------------
 */

Inheritance

CandlestickSeriesDataItem extends ColumnSeriesDataItem.

CandlestickSeriesDataItem is extended by OHLCSeriesDataItem.

Properties

adapter
#

Type ...

Inherited from DataItem

Holds Adapter.

animations
#

Type ...

Inherited from DataItem

A list of Animations objects currently mutating Data Item's values.

bullets
#

Type ...

Inherited from SeriesDataItem

A dictionary of data items bullets, where key is uid of a bullet template.

categories
#

Type object

Inherited from DataItem

An object containing categories.

categoryX
#

Type ...

Inherited from XYSeriesDataItem

Item's category on X category axis.

categoryY
#

Type ...

Inherited from XYSeriesDataItem

Item's category on Y category axis.

clonedFrom
#

Type $type.Optional < this >

Inherited from BaseObject

Reference to the original object this object was cloned from. We need to keep this so we can disassociate it from source object when this object is disposed.

closeValueX
#

Type ...

Close value for horizontal axis.

This is an alias for valueX added for convenience only.

closeValueY
#

Type ...

Close value for vertical axis.

This is an alias for valueX added for convenience only.

column
#

Type ...

Inherited from ColumnSeriesDataItem

A column used to draw a column for this data item.

config
#

Type ...

Inherited from BaseObject

Use this property to set JSON-based config. When set, triggers processing routine, which will go through all properties, and try to apply values, create instances, etc.

Use this with caution, as it is a time-consuming process. It's used for initialchart setup only, not routine operations.

customValue
#

Type ...

Inherited from XYSeriesDataItem

Item's custom numeric value.

dataContext
#

Type ...

Inherited from DataItem

Sets to a reference to an original object from Component's data.

A reference to an original object in Component's data, that this Data Item is derived from.

dateX
#

Type ...

Inherited from XYSeriesDataItem

Item's date value on X date-based axis.

dateY
#

Type ...

Inherited from XYSeriesDataItem

Item's date value on Y date-based axis.

dates
#

Type object

Inherited from DataItem

An object containing dates.

depth
#

Type ...

Inherited from DataItem

Depth of the Data Item.

In nested data structures, like TreeMap, this indicates the level this data point is at, in relation to the parent Data Item.

droppedFromOpen
#

Type boolean

Inherited from ColumnSeriesDataItem

Indicates if this data items close value is lower than its open value.

droppedFromPrevious
#

Type boolean

Inherited from ColumnSeriesDataItem

Indicates if this items value is lower than previous data item's value.

events
#

Type ...

Inherited from BaseObjectEvents

An EventDispatcher instance

hasProperties
#

Type boolean

Default false

Inherited from DataItem

Indicates whether Data Item has any properties set.

If it does not have any, the code can use this property to check whether they need to apply costly operation of re-applying properties, whenever Data Item-related element is redrawn, e.g. series.

hidden
#

Type ...

Inherited from DataItem

Sets hidden flag for data item. Mostly used to initially hide data item.

Returns true if this Data Item is currently hidden.

highValueX
#

Type ...

High value for horizontal axis.

highValueY
#

Type ...

High value for vertical axis.

id
#

Type ...

Inherited from BaseObject

Sets the user-defined id of the element.

ignoreMinMax
#

Type ...

Inherited from DataItem

Sets whether this data point should not be included in the scale and minimum/maximum calculations.

Exclude from min/max calculations?

E.g. some we may want to exclude a particular data point from influencing ValueAxis scale.

index
#

Type ...

Inherited from DataItem

Data Item's position index in Component's data.

isHiding
#

Type boolean

Default false

Inherited from DataItem

Indicates whether Data Item is currently animiting from visible to hidden state.

isTemplate
#

Type boolean

Default false

Inherited from DataItem

Identifies if this object is a "template" and should not be treated as real object that is drawn or actually used in the chart.

locations
#

Type object

Inherited from DataItem

An object containing locations for the Data Item.

A location is a position within date or category, or, in some other cases, where there is no single point but rather some period.

@see This link for info how data item locations work

lowValueX
#

Type ...

Low value for horizontal axis.

lowValueY
#

Type ...

Low value for vertical axis.

opacity
#

Type ...

Inherited from DataItem

Sets opacity for all Data Item's related elements (Sprites).

openCategoryX
#

Type ...

Inherited from XYSeriesDataItem

Item's open category on X category axis.

openCategoryY
#

Type ...

Inherited from XYSeriesDataItem

Item's open category on Y category axis.

openDateX
#

Type ...

Inherited from XYSeriesDataItem

Item's open date value on X date-based axis.

openDateY
#

Type ...

Inherited from XYSeriesDataItem

Item's open date value on Y date-based axis.

openValueX
#

Type ...

Inherited from XYSeriesDataItem

Item's open numeric value on X value axis.

openValueY
#

Type ...

Inherited from XYSeriesDataItem

Item's open numeric value on Y value axis.

parent
#

Type $type.Optional < this >

Inherited from DataItem

When we are using a nested data structure, like for example in a TreeMap, this property points to a parent Data Item of this one.

properties
#

Type object

Inherited from DataItem

An object containing Data Item specific appearance properties in key-value pairs.

Sometimes a single Data Item needs to apply different properties than the rest of the data Series it is part of. E.g. a single column, represented by a Data Item needs to be filled with a different color than the reset of the ColumnSeries it belongs to.

That's where Data Item's properties come into play.

Please note that you should set Data Item-specific properties using setProperty() method, rather than access properties object directly.

rangesColumns
#

Type ...

Inherited from ColumnSeriesDataItem

A dictionary storing axes ranges columns by axis uid

sprites
#

Type Sprite[]

Default []

Inherited from DataItem

A list of Sprite elements that are associated with this Data Item.

E.g. an Axis Data Item has several separate elements associated with it, like AxisTick, AxisLabel, and Grid.

Data Item keeps track of all of them, so it can toggle all related visual elements when it itself is toggled.

uid
#

Type ...

Inherited from BaseObject

Returns object's internal unique ID.

value
#

Type ...

Inherited from SeriesDataItem

data items's numeric value.

valueX
#

Type ...

Inherited from XYSeriesDataItem

Item's numeric value on X value axis.

valueY
#

Type ...

Inherited from XYSeriesDataItem

Item's numeric value on Y value axis.

values
#

Type object

Inherited from DataItem

An object containing calculated values.

visible
#

Type ...

Inherited from DataItem

Sets visibility of the Data Item.

Returns true if this Data Item is currently visible.

workingLocations
#

Type object

Inherited from DataItem

Current working locations.

There are 44 inherited items currently hidden from this list.

Methods

animate(

animationOptions: IAnimationOptions[] | IAnimationOptions,
duration: number,
easing?: ( value: number) => number

)

#

Returns Animation

Inherited from DataItem

Creates and starts an Animation to interpolate (morph) Data Item's properties and/or values.

@see Animation

clone(

cloneId?: string

)

#

Returns this

Inherited from BaseObject

Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them.

constructor()

#

Returns CandlestickSeriesDataItem

Constructor

copyFrom(

source: this

)

#

Returns void

Inherited from DataItem

Copies all properties and related data from different data item.

dispatch(

eventType: Key,
data?: any

)

#

Returns void

Inherited from BaseObjectEvents

Dispatches an event using own event dispatcher. Will automatically populate event data object with event type and target (this element).

It also checks if there are any handlers registered for this sepecific event.

dispatchImmediately(

eventType: Key,
data?: any

)

#

Returns void

Inherited from BaseObjectEvents

Works like dispatch, except event is triggered immediately, without waiting for the next frame cycle.

dispose()

#

Returns void

Inherited from SeriesDataItem

Destroys this object and all related data.

getCurrentThemes()

#

Returns ITheme[]

Inherited from BaseObject

Returns a list of themes that should be applied to this element. It could either be a list of themes set explicitly on this element, or system-wide.

getDate(

name: string

)

#

Returns Date

Inherited from DataItem

Returns a Date value of the data field.

getDuration(

duration?: number

)

#

Returns $type.Optional < number >

Inherited from DataItem

Returns a duration (ms) the Data Item should take to animate from one value to another.

If the duration is not specified via parameter, this method will try to request a default duration from the related Component.

getValue(

name: string,
calculated?: CalculatedValue

)

#

Returns $type.Optional < number >

Inherited from DataItem

Returns a numeric value for specific data field.

If calculated is not set, it will return a raw value, as it is in source data.

If calculated is set, it will return a pre-calculated specific value.

getWorkingValue(

name: string

)

#

Returns $type.Optional < number >

Inherited from DataItem

Returns a current working value for a specific data field.

The actual value may differ from the one returned by getValue(). The latter returns static values from the data source.

getWorkingValue() returns current value, which is usually different if Data Item is animating from one state to another.

hide(

duration?: number,
delay?: number,
toValue?: number,
fields?: string[]

)

#

Returns $type.Optional < Animation >

Inherited from DataItem

Hides the Data Item and related visual elements.

isDisposed()

#

Returns boolean

Inherited from BaseObject

Returns if this object has been already been disposed.

setCalculatedValue(

name: string,
value: number,
calculated: CalculatedValue

)

#

Returns void

Inherited from DataItem

setCategory(

name: string,
value: string

)

#

Returns void

Inherited from DataItem

Sets a related category for this Data Item.

@todo Review description

setDate(

name: string,
date: Date,
duration?: number

)

#

Returns void

Inherited from DataItem

Sets Date value to a data field.

setLocation(

name: string,
value: number,
duration?: number,
delay?: number

)

#

Returns void

Inherited from DataItem

Sets a relative location for a data field.

A location is always relative on a 0 to 1 scale, with 0 being beginning, 0.5 middle and 1 end.

@todo Rewiew description

setProperty(

name: string,
value: any

)

#

Returns void

Inherited from DataItem

Sets a Data Item-specific visual properties to apply to related elements.

setValue(

name: string,
value: number,
duration?: number,
delay?: number

)

#

Returns void

Inherited from DataItem

Sets a numeric value for specific data field.

setVisibility(

value: boolean,
noChangeValues?: boolean

)

#

Returns void

Inherited from DataItem

Sets visibility of the Data Item.

setWorkingLocation(

name: string,
value: number,
duration?: number,
delay?: number

)

#

Returns $type.Optional < Animation >

Inherited from DataItem

Sets a current working location for a data field.

@todo Rewiew description

setWorkingValue(

name: string,
value: number,
duration?: number,
delay?: number

)

#

Returns $type.Optional < Animation >

Inherited from DataItem

Set current working numeric value for a specific data field.

show(

duration?: number,
delay?: number,
fields?: string[]

)

#

Returns $type.Optional < Animation >

Inherited from DataItem

Shows the Data Item and related visual elements.

There are 23 inherited items currently hidden from this list.

Events

CandlestickSeriesDataItem does not have any events.

Adapters

#date

Param { date: Date,
  field: string }

#duration

Param number

#value

Param { field: string,
  value: number }

#workingValue

Param { field: string,
  workingValue: number }