I removed the internal flat storage of the nodes; now there is only the
two-dimensional groups array, which can be inspected from the outside. For
ease of implementation, I removed the old getters that allowed you to query
attributes (etc.) since it doesn't make as much sense to do that when the
selection is grouped. And anyway, that was primarily intended for debugging
purposes. You can still use `each` for iteration.
Hopefully, this should avoid confusion as to what the various indexes mean.
Note that since the callback is guaranteed to be invoked in-order, it's
possible with a little work to infer the group index and the global index. But
this at least gets people in the habit of only depending on the local index.
Rather than keeping the full data stack and passing it as multiple arguments
to each value function, we now pass the datum followed by the index. If you
want to define values in terms of parent data, bake it into the child data!
The tick format function doesn't have to be used with ticks, though. It's also
for convenient for determining an appropriate precision for any value label.
Previously, the tweens would not be initialized until the first tick, after a
minimum delay. It's more predictable if we initialize them during the initial
apply, especially if the tweens depend on external state (such as scales) that
may change after the transition has started.
If the select doesn't find any results, `o.node` is null, so we shouldn't run
any normal actions on it. But we still want to run the data action on it (to
generate the enter selection), so the fix is a bit more complicated than this.
This includes only the quantitative scale functions, which is primarily the
linear scale. Also included are `log` and `pow` scales, which are simple
transforms of linear scales. All the scale functions use the existing
interpolator logic, so you can specify an output range of numbers, colors,
fonts, paths... pretty much anything.