0.89
3
$9.75
1.00
2
$6.00
1.25
4
$13.20
9.36
5
$16.25
$
9.69
4
$13.20
0.67
3
$9.75
0.00
2
$6.00
$
6.25
2
$6.50
$
0.00
2
$6.60
0.25
2
$6.50
0.00
1
$3.00
10.50
4
$13.20
4.00
2
$6.50
10.69
4
$12.00
5.63
7
$23.10
6.96
5
$16.25
8.67
3
$9.00
0.00
2
$6.60
0.25
2
$6.50
11.56
3
$9.00
4.14
6
$19.80
0.00
1
$3.25
0.00
1
$3.00
2.25
2
$6.60
0.25
2
$6.50
$
11.00
4
$13.20
12.25
2
$6.50
2.25
2
$6.00
0.00
2
$6.60
13.44
5
$16.25
0.00
2
$6.00
4.67
3
$9.90
Cheryl
Shelley
Martin
Antoni
Regina
Nancy
Elio
Petra
Ian
Beate
Peter
Mayumi
Doubleshot Espresso
sum
count
variance
Caffe Espresso
sum
count
variance
Espresso con Panna
sum
count
variance

Description

This is an example of the React Pivot Grid with custom a custom data aggregation function. The pivot grid component provides several built-in functions: count, sum, min, max, average, product. In this example, we implement a custom function that calculates the variance of the data points of the respective pivot grid cell. To add or modify existing data aggregations, set the customAggregationFunctions property of the pivot data source. Each pivot aggregation functions must have a unique name, take an array of values as a parameter and return a number. For performance reasons, make sure that the function runs as quickly as possible. The React pivot grid will call the function multiple times during the data pivoting operations.