Skip to content Skip to sidebar Skip to footer

D3 Table Example With Array Of Arrays Yields Empty Td Tags

I am trying to create a table with d3.js following this example. Namely this is the code I am using var table = d3.select('#myTableDiv').append('table') .attr('sty

Solution 1:

To resolve the problem of the value of columns, you have to change the following line of code

return {column: column, value: row[column]};

by this one

return {column: column, value: row[columns.indexOf(column)]};

Enjoy !

Post a Comment for "D3 Table Example With Array Of Arrays Yields Empty Td Tags"