Class CFMultiAdapter

Hierarchy

Constructors

Properties

Accessors

  • get dimId(): string
  • Returns string

  • get dimLabel(): string
  • Returns string

  • get filters(): any[]
  • Returns any[]

  • set filters(value: any[]): void
  • Parameters

    • value: any[]

    Returns void

Methods

  • Parameters

    • __namedParameters: IGetDataParams

    Returns {
        _value: any;
        key: any;
        value?: any;
    }[]

  • Add this filter to existing filters.

    Override this if you need to alter the default behaviour of this filter to be just appended to the current list.

    TODO: link to example

    Parameters

    • f: any

    Returns void

  • Different data backends will implement it differently. Crossfilter version will apply the filter onto the corresponding dimension.

    Returns void

  • Returns any

  • An opportunity to cleanup.

    Returns void

  • Filter the chart by the given parameter, or return the current filter if no input parameter is given.

    The filter parameter can take one of these forms:

    Note that this is always a toggle (even when it doesn't make sense for the filter type). If you wish to replace the current filter call chart.replaceFilter(filter) instead.

    Each toggle is executed by checking if the value is already present using the hasFilter; if it is not present, it is added using the addFilter; if it is already present, it is removed using the removeFilter.

    In the Crossfilter version, once the filters array has been updated, the filters are applied to the crossfilter dimension, using the applyFilters.

    Once you have set the filters, call redrawGroup (or redrawAll) to redraw the chart's group.

    See

    Example

    // filter by a single string
    chart.filter('Sunday');
    // filter by a single age
    chart.filter(18);
    // filter by a set of states
    chart.filter([ ['MA', 'TX', 'ND', 'WA'] ]);
    // filter by range -- note the use of filters.RangedFilter, which is different
    // from the syntax for filtering a crossfilter dimension directly, dimension.filter([15,20])
    chart.filter(new RangedFilter(15,20));

    Returns any

  • Parameters

    • filter: any

    Returns CFMultiAdapter

  • Check whether any active filter or a specific filter is associated.

    Parameters

    • Optional filter: any

    Returns boolean

  • Parameters

    • name: string

    Returns LayerSpec

  • This will notify charts that filters have changed. It will be implemented in one of derived classes.

    Parameters

    • filters: any[]

    Returns void

  • Remove this filter from existing filters.

    Override this if you need to alter the default behaviour of this filter to be just removed from the current list.

    TODO: link to example

    Parameters

    • filter: any

    Returns void

  • Clear current filters.

    Returns void

  • Parameters

    • filter: any

    Returns void

Generated using TypeDoc