From the course: DC.js for Data Science Essential Training

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Linking two charts together

Linking two charts together - JavaScript Tutorial

From the course: DC.js for Data Science Essential Training

Start my 1-month free trial

Linking two charts together

- [Instructor] Now we're going to create a simple dashboard, and the way to do this is to build a basic webpage with two columns, and then ask dc to fill each of the columns, or div elements as they'll actually be, with different charts. So, we're going to have a pie chart in one, and a data table in the other. And for this first dashboard we're going to use our simple data set, which was 12 payment transactions, and we're going to begin with the data table page because it already contains one of the elements we want. So we'll call it dashboard1, as there will be others. Dashboard one can go up there. We're not going to need bootstrap in this one. And until now generally we've created one div element. And then we've asked dc to populate the div element with an svg and various graphical elements. But this time, we need more than one div element, don't we? Because we're outputting two distinct charts. So we're going to create different kind of structure, div class of column, like so, so…

Contents