Table of contents

setBottomX

setBottomX(hierarchyName:String, num:Number, measure:Object)

[starting from version: 1.4]

Sets the Bottom X filter for the specified hierarchy and measure.

Parameters

  • hierarchyName – String. The name of the hierarchy.
  • num – Number. Number of elements to choose.
  • measure – Object. Identifies the measure on which Bottom X filter will be applied. Has the following properties:
    • uniqueName – String. Unique measure name.
    • aggregation (optional) – String. Measure aggregation type.

Example

flexmonster.setBottomX("Category", 3, {"uniqueName": "Price"});

flexmonster.getFilterProperties("Category");

/*
method getFilterProperties() returns the following object:
{
  type: "bottom",
  members: [],
  measure: {"uniqueName": "Price"},
  quantity: 3
}
*/

flexmonster.getFilter("Category");

/*
method getFilter() returns the following Array:
[
  {caption: "Clothing", hierarchyName: "Category", uniqueName: "category.[clothing]"},
  {caption: "Accessories", hierarchyName: "Category", uniqueName: "category.[accessories]"},
  {caption: "Components", hierarchyName: "Category", uniqueName: "category.[components]"}
]
*/

Check out on JSFiddle.

See also

setTopX
clearFilter
getFilter
getFilterProperties
setFilter