1
votes

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

2

2 Answers

1
votes

I removed 1 but still had it filtered with

dimension.filter(1);

reset with this:

dimension.filterAll();

fiddle

0
votes

Best I understand it, crossfilteredObject.remove(); removes ALL objects from the original crossfilteredObject.

There are no objects in your db object for the dimension to draw upon.