Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providing only visible data (+length) ? #153

Open
goulu opened this issue Jun 25, 2018 · 1 comment
Open

providing only visible data (+length) ? #153

goulu opened this issue Jun 25, 2018 · 1 comment

Comments

@goulu
Copy link

goulu commented Jun 25, 2018

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>"
    });
@goulu
Copy link
Author

goulu commented Jun 27, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant