setFilter(uniqueName: String, filter: FilterObject)
[starting from version: 1.4]
Sets the filter for the specified field.
filter.members
filter.exclude
filter.include
1) If you want to see data for certain field members, specify them in the members property:
members
pivot.setFilter("Country", { "members": [ "country.[poland]", "country.[uk]", "country.[ukraine]", ] });
Try the example on JSFiddle.
2) If you want to hide certain field members, specify them in the exclude property:
exclude
pivot.setFilter("Country", { "exclude": [ "country.[australia]", "country.[japan]", "country.[norway]", "country.[sweden]", ] });
Check out the example on JSFiddle.
clearFiltergetFilter
In this guide