ZoomCharts Documentation

ZoomCharts.Configuration.TimeChartSettingsSeriesData

Inheritance hierarchy

This type inherits from LinearChartSettingsSeriesData.

This type is implemented by TimeChartSettingsSeriesCandleStickData.

Methods

This type does not define any methods.

Properties

aggregatedValueFunction: (value: number, time: number, units: string) => number

Prepare displaying value after data aggregation.

Parameters
value: number

aggregated value that is about to be displayed

time: number

time display unit time stamp in ms

units: string

display unit

Return value
Data type: number

the value to display.

aggregation: "sum" | "min" | "max" | "first" | "last" | "avg" | "count"

Aggregation function to use. Used when data source does not provide data in needed display unit. Note that when avg is used, you should provide countIndex so that the calculation is correct even across multiple units.

Valid values:
  • sum
  • min
  • max
  • first
  • last
  • avg
  • count - counts non-null values. If countIndex is specified, uses that number for each value, otherwise counts each value as 1.
countIndex: number

Index in the value array where the count of aggregated values are located. This is optional but should be provided if the aggregation method is avg (average) and URL or dataFunction is used to aggregate the values external to the chart because otherwise the chart will aggregate values by simply counting them. So if countIndex is not provided and there are values: [[May 1 2014, 5], [May 2 2014, 15], [June 1 2014, 20]] the aggregation to year 2014 will yield (5+15+20)/3 = 13.3 when the display unit is days but ((5+15)/2 + 20)/2 = 15 when the display unit is months.

index: number

Index in value the array where the values that will be aggregated are located. An alternative is to use valueFunction.

noDataPolicy: "join" | "skip" | "zero"

Method used to fill in time intervals that have no data. Used only for line series.

Valid values:
  • join - links data points with straight line
  • skip - do not draw in this interval.
  • zero - draw as the value is zero.
source: string

Data source to use if multiple data sources are available.

valueFunction: (data: Array<number>) => number

Retrieves the individual value used for calculations from the data array. This is an alternative for specifying index.

Parameters
data: Array<number>

entry in data values array where the value at index 0 is the timestamp

Return value
Data type: number

value to pass to aggregation

X