For a particular reason a client wants to hide some aggragations like "median" and "difference".
Is it possible do so using API calls for the JSON/CSV version of flexmonster?
I used CSS, but i think it's not the best solution
#fm-pivot-view#fm-aggregations-view{
li[data-index='4'].fm-ui-element,
li[data-index='5'].fm-ui-element,
li[data-index='11'].fm-ui-element,
li[data-index='12'].fm-ui-element,
li[data-index='13'].fm-ui-element,
li[data-index='14'].fm-ui-element,
li[data-index='15'].fm-ui-element,
li[data-index='16'].fm-ui-element{
display:none;
}
Hello, Davide,
Thank you for writing to us.
We would like to point out that Flexmonster has a special parameter responsible for this - availableAggregations
, defined in the slice object
The availableAggregations
parameter accepts an array of strings that represents the list of aggregation functions which can be applied to the current measure.
Here is the list of all available (for CSV, OCSV and JSON data sources) aggregation functions: "sum", "count", "distinctcount", "average", "median", "product", "min", "max", "percent", "percentofcolumn", "percentofrow", "index", "difference", "%difference", "runningtotals", "stdevp", "stdevs".
For example, only the "sum", "count", and "distinct count" will be available to the user for the "Price" field:
measures: [
{
uniqueName: "Price",
availableAggregations: [
"sum",
"count",
"distinctcount"
]
}
]
Also, you can configure a measure without having to display it on the grid by setting the active
parameter to false
:
measures: [
{
uniqueName: "Quantity",
active: false,
availableAggregations: [
"sum",
"count",
"distinctcount"
]
}
]
Here is a JSFiddle example for illustration.
Please let us know if everything works fine for you.
We are looking forward to hearing from you.
Best Regards,
Vera