Margin widths not taking account of tick labels

### Issue
For the gridlines example on the website, the y-axis is formatted to display millions as "30M", but the amount of space given between the axis label and the tick labels is enough to fit "30,000,000" in.

It was actually using the maximum value, which was formatted as "53.012456M", rather than the tick value.

### Solution
- Introduced a `tickValues()` function for getting the tick values
- Updated the `calculateLabelDimensions` function to use the tick values
- Added tests

For user-visible comments, i'd refer to this as an "issue" rather than an "edge case" (especially with how common it is likely to be)