Check documentation for the latest version 6.0 of dhtmlxSuite group DHTMLX Docs

group

groups data by a certain property. The method get an object with the following properties as a parameter:

void group(string by,object map);

Parameters

bystringdefines the property that need being used to group data objects
mapobjectan object that defines the properties of the grouped objects

Example

myChart.group({
    by:"#company#",
    map:{
        sales:["#sales#","sum"]
    }
});

Details

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