Barchart Example Five

D3 ranges are pretty cool. It will try to coerce anything your give it into nice scales. Here we created a color scale by giving it two color values. For the domain, we map this to another dimension and we get a second level encoding.