Skip to content

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

@mrjones-plip

Description

@mrjones-plip

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions