sum

gets the sum of property values

number sum(string property,object data);
propertystringa data property
dataobjecta dataset with items of a group
numbersum of property values

Example

$$("mychart").group({
    by:"year",
    map:{
        sales:["sales","sum"]
    }
});
// displays the total sales for each year

Related samples

See also
Back to top