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

Unlock the full course today

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

Filtering with a range chart

Filtering with a range chart - JavaScript Tutorial

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

Start my 1-month free trial

Filtering with a range chart

- [Instructor] So far, we've filtered our charts by clicking on them, but DC will also let you filter using something called a brush. If we scroll down in this DC example, you see an area chart here, which shows movements in a price index, and then, underneath that, we have a shallower chart, which actually shows volume, and by clicking and dragging on the lower chart, we can apply a filter to the upper one, because the two charts are linked. The proper name for this shallow, lower chart, is a range chart. Not only can I click and drag a time period, I can also drag that period to different locations. We're going to go back to our line chart and add a volume chart underneath. So, here's the line chart the last time that we saw it, and I just want to point out that, by default, if this were part of a dashboard, we would be able to click and drag to create a filter on the chart itself. So, that's the default behavior, but we're going to switch that off and add a linked range chart…

Contents