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).
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.
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