groups data by a certain property. The method get an object with the following properties as a parameter:
by | string | defines the property that need being used to group data objects |
map | object | an object that defines the properties of the grouped objects |
myChart.group({
by:"#company#",
map:{
sales:["#sales#","sum"]
}
});
Properties of grouped objects set in "map" are defined by an array. The first element of this array is a template with a property from original data, the second one – the functor which needs being applied to all values of this property in a group: "sum", "max", "min" or Custom Grouping Functor
Back to top