square / crossfilter

Fast n-dimensional filtering and grouping of records.
https://square.github.com/crossfilter/
Other
6.22k stars 1.3k forks source link

expand dimension.top() and dimension.bottom() to include offset parameter #163

Closed nreese closed 8 years ago

nreese commented 9 years ago

I am looking for a simple way to access the middle of a crossfilter dimension. Example usage is pagination on crossfilter dimension.

I can do this by using the existing API of top() or bottom() and then just grabbing the piece that I need but this seems inefficient to get all of the data to then just use a tiny piece.

Would it be possible to extend the top() and bottom() API to include an optional offset parameter? For example dimension.top(10) would return the top 10 records dimension.top(10, 25) would return the top 10 records starting at index 24 (zero based index).

Thanks

Nathan

RandomEtc commented 8 years ago

Apologies for silence here. As discussed in #151 an active fork is being developed in a new Crossfilter Organization - you might get better answers on their fork or on Stack Overflow.

nreese commented 8 years ago

Will do. Thanks for the links