Reputation: 119
I am new to d3.js, currently i am using this js to generate a graph. The graph is append to a <div>
. I am wondering is it possible to put this graph inside a table? Thank you so much!
Upvotes: 2
Views: 1581
Reputation: 8264
Yes, it's possible. The best way to do it is creating a reusable chart, create a selection with the cells, bind your dataset and invoke the chart using selection.call
. You can even create the table with D3.
There is a number of valid reasons to put a chart inside a table. For instance, it can be useful to put sparklines in a table cell to complement the information given in each row.
Upvotes: 3