json - Integrating tabletop.js with d3.js? -
i want reference google spreadsheet using tabletop for data in d3 visualization. best solution can come this, know it's not quite right.
window.onload = function() { init() }; var public_spreadsheet_url = 'https://docs.google.com/spreadsheet/pub?hl=en_us&hl=en_us&key=0amyzu_s7qhsmddnzuzrlyldnwtzclxdrmxlyqzvxsfe&output=html'; function init() { tabletop.init( { key: public_spreadsheet_url, callback: showinfo, simplesheet: true } ) } d3.json("showinfo", function(data) { console.log(data); });
the data comes array (see output below); , there no need apply d3.json
. can start using array d3 visualization right away.
window.onload = function() { init() }; var public_spreadsheet_url = "https://docs.google.com/spreadsheet/pub?hl=en_us&hl=en_us&key=0amyzu_s7qhsmddnzuzrlyldnwtzclxdrmxlyqzvxsfe&output=html"; function init() { tabletop.init( { key: public_spreadsheet_url, callback: showinfo, simplesheet: true } ) } function showinfo(rows) { console.log(rows); // build d3 vis here.. }
Comments
Post a Comment