mbostock/d3 — pull request #2000 by jasondavies (2014-08-28 14:36:03+00:00)
Title: Fix group formatting and padding.

Very small or large numbers use exponent notation when converted to strings. If grouping is enabled and there is no decimal, the exponent wasn’t being ignored, so the group separator was in the wrong place.

This also fixes a bug relating to padding and thousands grouping: the padding calculation assumed a grouping of [3].

Fixes #1972, #1994.