Using the custom data source API allows you to decide which aggregations to enable in Flexmonster and support on the back end.
The supported aggregations can be defined in the schema for fields of a certain type or for each field individually. The aggregations supported by Flexmonster for the custom data source API connection are the following: "sum"
, "count"
, "distinctcount"
, "average"
, "median"
, "product"
, "min"
, "max"
, "stdevp"
, "stdevs"
, "none"
.
In the schema, these are the only aggregation names that can be defined, since Flexmonster Pivot does not support custom aggregation names.
It is possible to define which aggregations are available for which fields in the back end; it is also not necessary to implement all the aggregations supported by Flexmonter.
For the custom data source API, Flexmonster supports the following built-in front-end aggregations: "percent"
, "percentofcolumn"
, "percentofrow"
, "percentofparentcolumntotal"
, "percentofparentrowtotal"
, "index"
, "differenceofcolumn"
, "differenceofrow"
, "%differenceofcolumn"
, "%differenceofrow"
, "runningtotalsofcolumn"
, "runningtotalsofrow"
.
These aggregations will appear in Flexmonster Pivot automatically if at least one aggregation is implemented on the back end (e.g., "sum"
).
This feature is available only for the fields of the "number"
type.
On the client side, the list of aggregations available for a specific field can be customized with a Mapping Object. This object has the "aggregations"
property, which defines a list of available aggregations. That list can contain both the aggregations supported on the back end and the built-in front-end aggregations.
To learn more about the "aggregations"
property, refer to the Mapping guide.
You may be interested in the following articles: