NeXTs / Clusterize.js

Tiny vanilla JS plugin to display large data sets easily

Home Page:https://clusterize.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

providing only visible data (+length) ?

goulu opened this issue · comments

commented

I'm working on a D3.js wrapper to make sorting+filtering easier.
Current state is in http://bl.ocks.org/goulu/a45ad9ba663e23d470dbd0cbbab1bdd7
The problem is that data is duplicated between the D3 Table object and the Clusterize object.

Is there a way to dynamically pass only the visible data to Clusterize ? Something like:

    clusterize.length=5000; // number of rows
    clusterize.update(
      function(i) {
        return "<tr><td>data of</td><td>"+i+"</td><td>th row</td></tr>"
    });
commented

implemented it in my fork https://github.com/goulu/Clusterize.js
stays pretty compatible with existing demo : https://rawgit.com/goulu/Clusterize.js/master/Clusterize.js.html
example of a D3js+Clusterize table here : http://bl.ocks.org/goulu/a45ad9ba663e23d470dbd0cbbab1bdd7

What do you think ? should I PR it ? It's a pretty deep change ...