Class: FilterManager

graphly~ FilterManager

The FilterManager class

new FilterManager(options)

Create instance of FilterManager
Parameters:
Name Type Description
options Object Configuration of the Filter Manager.
Properties
Name Type Description
el String d3 selector identifer string.
showCloseButtons boolean Optional, default false. Add close icon for each filter.
replaceUnderscore boolean Optional, default false. Replace underscore with spaces when showing parameter identifier as labels.
filterSettings FilterSettings Optional additional Filter Settings.
ignoreParameters array Optional array with parameter ids to be ignored
Fires:

Methods


initManager()

Initialize various objects of class

resetManager()

Reset all filters

setRenderNode(el)

Set the node where the manager shall be rendered to after instanziation.
Parameters:
Name Type Description
el String d3 selector identifer string.

getNode()

Set the node where the manager shall be rendered to after instanziation.
Returns:
html node where FilterManager is being rendered to.
Type
Object

loadData(data)

Load data to be used for creation of filter panels
Parameters:
Name Type Description
data Object Object containing parameter id as key and array of values as value.

updateFilterSettings(settings)

Update used filter settings and re-render
Parameters:
Name Type Description
settings Object See filterSettings description of Filter Manager constructor.

updateDataSettings(settings)

Update used data settings and re-render
Parameters:
Name Type Description
settings Object See dataSettings description of Filter Manager constructor.

Events


removeFilter

When close buttons are shown event is fired with parameter identifier when close button is clicked.
Properties:
Name Type Description
id String Provides identifier of parameter

removeFilter

When close buttons are shown event is fired with parameter identifier when close button is clicked.
Properties:
Name Type Description
id String Provides identifier of parameter

filterChange

Event fired When any filter is changed.
Properties:
Name Type Description
filters Object object containing parameter identifier as key and filter function as value.

removeFilter

When close buttons are shown event is fired with parameter identifier when close button is clicked.
Properties:
Name Type Description
id String Provides identifier of parameter