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.
Working with dates to make a line or area chart - JavaScript Tutorial
From the course: DC.js for Data Science Essential Training
Working with dates to make a line or area chart
- [Instructor] Now we're going to make an area chart using time series data. So you can save the barChart file as lineChart, so that we effectively make a copy and we can change title to Line chart, and the heading can be Line chart: total payment over time, like so. We can leave the html structure which is just a single div, as it is, and we can leave the id name as chart, that's fine as well. And for now even, we're going to work with the same data. So to begin with, all we're going to do is change dc.barChart to dc.lineChart, and then we're going to navigate to our new page, and refresh. Now we can see the power of dc by changing one little thing, immediately we have a line chart using all of the same parameters that we used before. Many parameters are common to all charts like this, but this isn't the best example of a line chart because it's bucketed data, and you'd normally use a bar chart to show that kind of data, so let's go for something more normal and head for a time…
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
-
-
-
-
Making a bar chart11m 5s
-
(Locked)
Modifying our bar chart15m 57s
-
(Locked)
Working with dates to make a line or area chart15m 28s
-
(Locked)
Making a stack area chart with legend3m 43s
-
(Locked)
Exploring SVG with a pie chart13m 13s
-
(Locked)
Making a scatter plot9m 29s
-
(Locked)
Making a bubble chart13m 28s
-
(Locked)
Making a data table with bootstrap17m 46s
-
(Locked)
Understanding common attributes5m 25s
-
-
-
-