Cross Filter Group Not Returning Filtered Set

My data is as follows:

[{timestamp:1213240000,mag:6,pressure:50,duration:30}, {timestamp:1213250000,mag:6.4,pressure:50,duration:5}, {timestamp:1213260000,mag:5.9,pressure:50,duration:14}, {timestamp:1213270000,mag:4.3,pressure:50,duration:6}] 

My sizes:

 var dateDim = ndx.dimension(function(d){return d.timestamp}); var magDim = ndx.dimension(function(d){return d.mag}); 

My filter:

 dateDim.filter([1213250000,1213260000]); 

My group:

 var grp = magDim.group(); 

Unfortunately,

 console.log(grp.all()); console.log(grp.top(Infinity)); 

Gives me the whole dataset without respecting my filter.

but,

 console.log(magDim.top(Infinity)); 

It works great. I get filtered data

Fiddle: http://jsfiddle.net/iamjab/paftztyL/

I want to get only a filtered set. How to delete entries using Value: 0

Thanks.

0
source share

All Articles