Search code examples
crossfilter

Crossfilter Remove Records


I am trying to remove data from crossfilter. The docs state:

crossfilter.remove()

Removes all records that match the current filters from this crossfilter.

var db = crossfilter([1, 2, 3]),
dimension = db.dimension(Number);
dimension.filter(1);
db.remove();

I would expect this to return [2, 3], but I am getting [ ].

JSFiddle


Solution

  • I removed 1 but still had it filtered with

    dimension.filter(1);
    

    reset with this:

    dimension.filterAll();
    

    fiddle