Filter

Filter

new Filter()

A filter provides a chart with an interface to the data. The filter contains a number of Partitions and Aggregates. It takes care of calling the relevant functions provided by a Dataset.

Basic usage for a Chart is:

  1. The chart renders using Filter.data if available
  2. It can add or remove partitions and aggregates to the filter
  3. It calls Filter.updateSelection(..) when the user makes a selection
  4. To apply the new selection, and also filter the other charts, the chart calls Filter.updateDataFilter()
  5. The charts redraws on 'newData' events on the filter

The filter does the following:

  1. It adds or removes paritions and aggregates on request
  2. When it has the right number of partitions and aggregates, Filter.isConfigured becomes true and Filter.initDataFilter() is called
  3. This in turn creates a Filter.getData function
  4. As the new filter could affect all plots Dataset.getAllData called

Filter.getData does the following:

  1. It arranges for the Filter.data array to be filled
  2. A newData event is triggerd, and the chart's callback function is executed
Source:

Extends

Members

(static) aggregates :Array.<Aggregate>

Type:
Source:

(static) data :Data

Array containing the data to plot

Type:
Source:

(static) partitions :Array.<Partitions>

Type:
  • Array.<Partitions>
Source:

(static) title :string

Title for displaying purposes

Type:
  • string
Source:

Methods

(abstract, static) getData()

Call this function to request new data. The dataset backing the facet will copy the data to Filter.data. A newData event is fired when the data is ready to be plotted.

Source:
Fires:
  • event:newData

(abstract, static) initDataFilter()

initDataFilter Initialize the data filter, and construct the getData callback function on the filter.

Source:

(abstract, static) releaseDataFilter()

relaseDataFilter The opposite or initDataFilter, it should remove the filter and deallocate other data related to the filter.

Source:

(abstract, static) updateDataFilter()

updateDataFilter Change the filter parameters for an initialized filter

Source:

Events

newData

newData event Indicates new data is available at Filter.data for plotting.

Source: