This video is available to students only

Create dimensions

A hopefully familiar step by now: creating our chart dimensions.

Create dimensions#

Histograms are easiest to read when they are wider than they are tall. Let's set the width before defining the rest of our dimensions so we can use it to calculate the height. We'll also be able to quickly change the width later and keep the same aspect ratio for our chart.

Chart design tip: Histograms are easiest to read when they are wider than they are tall.

Instead of filling the whole window, let's prepare for multiple histograms and keep our chart small. That way, the charts can stack horizontally and vertically, depending on the screen size.

 

This page is a preview of Fullstack D3 Masterclass

No discussions yet