Learn how to use the variety of parameters available for styling DC bar charts.
- [Teacher] DC offers us a huge number of settings…to change the appearance of our charts.…With a bar chart, we can start by using .gap,…and we can set that to one, we know it defaults to two.…And you might be able to see that…that has got a bit thinner, and we can change it to 10,…and of course we see it get larger.…Alternatively, you can use barPadding and outerPadding.…
Now these work differently to gap, just comment that out,…in that they accept a percentage in decimal form.…So they're expecting a number between zero and one.…The percentage is applied to the bar width,…so let's try first of all a barPadding of one…and we won't set outerPadding to anything.…And you can see we have matchstick-thin bars there…because barPadding has eaten away all of the space.…So let's change that to 0.5, and that looks a lot better.…
So we've got three bars here now, and we've got four gaps.…One, two, three, four, and our four gaps are all equal.…Now if we set barPadding to 0.2,…you see that the gaps are no longer equal.…We have two outer gaps and two inner gaps,…
- Downloading and setting up DC.js
- Building dashboards
- Making charts: bar, area, pie, bubble, boxplot, and series
- Applying graphical filtering
- Working with dates
- Restyling dashboards
- Using D3 charts in a DC dashboard
- Linking charts together
Skill Level Intermediate
Crossfilter for Data Science Essential Trainingwith Emma Saunders1h 33m Intermediate
D3.js Essential Training for Data Scientistswith Emma Saunders4h 38m Intermediate
Data Visualization Tips and Trickswith Matt Francis2h 14m Intermediate
1. Preparing to Code in DC
2. Individual Charts
3. Making Advanced Charts
4. Building a Dashboard
- 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.