From the course: DC.js for Data Science Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Filtering with brush - JavaScript Tutorial
From the course: DC.js for Data Science Essential Training
Filtering with brush
- [Instructor] Now we're going to modify our dashboard and add a line chart to it and see how the default behaviors work on that. So let's begin by making a copy of our dashboard and then we're going to copy and paste our original lineChart into that dashboard. So for lineChart we can say and this is our original lineChart that doesn't have an attached range chart with it. So there's that declaration and it uses dateDimension and dateGroup. We'll take off the stack for now. Let's check that we have dateDimension and dateGroup. There's dateDimension. And we'll return d.total. So it's going to be a lineChart over time showing the total spend. And we'll make our width suitably shorter, like so. And we're using two variables here, minDate and maxDate, which aren't specified so let's copy that and we'll pop it up by the dimension definitions. So this bit's not actually for the table. It's going to be for our line chart, like so. Now we're going to need to change our html a bit, so we've…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Linking two charts together11m 56s
-
(Locked)
Understanding graphical filtering20m 59s
-
(Locked)
Filtering with a range chart5m 44s
-
(Locked)
Filtering with brush4m 49s
-
(Locked)
Filtering with brush in two dimensions6m 14s
-
(Locked)
Adding finishing touches with dc.dataCount and Reset All11m 41s
-
(Locked)
Adding finishing touches with filterPrinter & numberDisplay11m 28s
-
(Locked)
Complementing DC with D313m 5s
-
(Locked)
-