series.aggregateString|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.
Example
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: new Date(2000, 1, 1), open: 10, high: 15, low: 8, close: 12 },
{ date: new Date(2000, 1, 2), open: 12, high: 18, low: 10, close: 16 },
{ date: new Date(2000, 1, 3), open: 16, high: 20, low: 14, close: 18 }
]
},
dateField: "date",
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close",
aggregate: "max"
}]
});
</script>
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
nullif 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
pseudo
aggregate: {
open: "max",
high: "max",
close: "min",
low: "max"
}
In this article