palantir/plottable — pull request #553 by bmalehorn (2014-06-12 23:47:27+00:00)
Title: pluggable autodomain via Domainer object

Now that #531 is merged in, we can actually do #455. This branch introduces the `Domainer` object.

```
var xScale = new Plottable.Scale.Linear()
.setDomainer(new Plottable.Domainer().pad().nice());
```

This lets you turn on and off common settings for autodomaining, and gives us a place to put more of these options (include 0, etc.).

Also, you can set your own function if you want. Here's the default one:

```
new Plottable.Domainer((extents: any[][]) => [d3.min(extents, (e) => e[0]), d3.max(extents, (e) => e[1])])
```

This means that `scale.padDomain()` and `scale.nice()` are removed, you must go though a `Domainer` object.