This video covers how to create linear scale.
- [Instructor] We're going to create…some axes on our area chart.…This is going to take the following two sections.…So this section is how to make the scale…for the axis that we will add in the next section.…So, we can close the Interpolate file…and redirect our HTML file to area.js…which we can now re-open.…And we're all set to start.…D3 scales can be continuous,…ordinal, quantized or sequential.…We want the most common type of continuous scale…which is a numeric linear scale.…
So let's just check that we've got an area chart showing.…And there, we have.…Let's do the y-axis first.…After the data and after the height and width,…but before the area generator,…we're going to enter…var y = d3.scaleLinear().domain().range():.…And that is the structure that scales always take.…You declare the type of scale you want…and then take a domain as an input…and a range as an output.…
And you can write it all in one line like this,…but I think it's gonna be easier…when we start filling those out…if we pop them on separate lines, like that.…
- Making a simple bar chart with D3
- Understanding SVG graphics
- Drawing basic shapes
- Adding text
- Using generators and the path element
- Creating a scale and axes
- Importing data into D3
- Creating trees and Voronoi tessellations
- Preparing your data for advanced graphics
- Adding interactivity and transitions
- Choosing the right graphic
- Finding D3.js plugins
Skill Level Intermediate
Data Visualization for Data Analystswith Bill Shander1h 31m Beginner
2. Making a Simple Bar Chart with D3
3. Basic Shapes, Courtesy of SVG
4. Advanced Shapes, with D3 and Path
5. Scales and Axes
6. Importing Data into D3
7. Additional Graphics with D3 Layout
8. Preparing Your Data for Advanced Graphics
10. Picking the Right Graphic
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.