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

add callback when map and table are done being rendered #25

Closed
mrjones-plip opened this issue Jul 20, 2016 · 0 comments
Closed

add callback when map and table are done being rendered #25

mrjones-plip opened this issue Jul 20, 2016 · 0 comments

Comments

@mrjones-plip
Copy link
Contributor

It would be great to have a function called when the map and table respectively are done being rendered. The work around I have done is to use $(window).on("load", function() {}) like this:

var viz = d3.maptable('#vizContainer')
              .csv('/examples/data/ixp.csv')
              .map({ path: '/examples/maps/world-110m.json' }) 
              .table()
              .render();

$(window).on("load", function() {
              console.log('maptable done');
});

But if there were callbacks for both and map and table, I could do discrete things like this:

var viz = d3.maptable('#vizContainer')
              .csv('/examples/data/ixp.csv')
              .map(
                            { path: '/examples/maps/world-110m.json' },
                            complete: function (){map_done()};
              )  
              .table(
                            complete: function (){table_done()};
              ) 
              .render();
function map_done(){ 
             console.log('map is done!');
}
function table_done(){ 
             console.log('table is done!');
}

this would add a lot of flexibility!

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

No branches or pull requests

1 participant