series.aggregate String|Function
(default: "max")
The aggregate function to apply for date series.
This function is used when a category (an year, month, etc.) contains two or more points. The function return value is displayed instead of the individual points.
The supported values are:
- "avg" - the average of all values for the date period.
- "count" - the number of values for the date period.
- "max" - the highest value for the date period.
- "min" - the lowest value for the date period.
- "sum" - the sum of all values for the date period. Defaults to 0 if no data points are defined.
- "sumOrNull" - the sum of all values for the date period. Defaults to
null
if no data points are defined. - "first" - the first value
- function(values, series, dataItems, category) - user-defined aggregate function. Returns single value or data item.
- object - (compound aggregate) Applicable to "candlestick" and ohlc "series". Specifies the aggregate for each data item field.
Example
aggregate: {
open: "max",
high: "max",
close: "min",
low: "max"
}