Join Ray Villalobos for an in-depth discussion in this video Adding a horizontal guide, part of D3.js: Data Visualization.
…And last video we did the vertical guide, so…now it's obviously time to do the horizontal one.…Now if we make this window a little bit smaller so…we could see a little bit more of what's going on and…I've also turned off the word wrap so that we can see everything in one line.…So, what I need to do is create the other guide so…it's going to look similar to what we've done before.…We'll start by setting up the H or the horizontal axis and…that's going to be pretty much like the vertical one, just a D3 SVG axis.…
Just going to use that method and then we'll set the scale to be the x scale.…So, this, remember, is essentially the scale that we create up here.…This will just give us the numbers of the bottom values here.…So it's going to go form the left,…in this case from zero to the however many bars we have.…So remember the bars vary depending on the amount of data that we have…fed into the system, so right now, there's 50 of them, but there could be more.…
So that's what we're using as the scale.…Next would be the orientation.…
Author
Released
8/7/2014- What is D3.js?
- Creating a basic document structure
- Controlling HTML DOM elements
- Binding data to the DOM
- Drawing SVG graphics with D3
- Using ordinal scales
- Adding events and transitions
- Working with data
- Creating and adjusting layouts
Skill Level Intermediate
Duration
Views
Related Courses
-
Working with Data on the Web
with Joseph Lowery2h 20m Intermediate -
JavaScript: Enhancing the DOM
with Ray Villalobos2h 3m Intermediate
-
Introduction
-
Introduction1m 1s
-
What you should know1m 4s
-
-
1. Setting Up and Installing
-
What is D3.js?3m 18s
-
-
2. Learning the Basics
-
Creating basic selections6m 37s
-
Modifying attributes and CSS5m 19s
-
Binding data to the DOM7m 26s
-
-
3. Working with SVG Graphics
-
What is SVG?2m 4s
-
Understanding SVG primitives9m 59s
-
Drawing SVG graphics with D34m 52s
-
-
4. Using D3 Methods
-
Adding quantitative scales6m 32s
-
Using ordinal scales5m 49s
-
Adding events3m 18s
-
Adding a tooltip5m 39s
-
-
5. Using Data
-
Adjusting margins9m 59s
-
Using external data12m 14s
-
6. Working with Layouts
-
Creating a pie layout11m 9s
-
Improving our pie layout7m 14s
-
Working with force layouts11m 42s
-
Drawing our nodes11m 44s
-
Controlling text nodes8m 3s
-
-
Conclusion
-
Next steps2m 2s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Adding a horizontal guide