anomal/RainbowVis-JS — pull request #4 by kachkaev (2013-01-17 17:13:32+00:00)
Title: Method chaining support

Method chaining can reduce lines of code and can be especially useful when new Rainbows are defined as object properties.

Was:

```
var rainbow1 = new Rainbow();
rainbow1.setNumberRange(0, 1);
rainbow1.setSpectrum('c0e0e8', '428696');

var rainbow2 = new Rainbow();
rainbow1.setNumberRange(0, 1);
rainbow1.setSpectrum('c0e8c2', '429756');

var myColourScheme = {
'blues': rainbow1,
'greens': rainbow2
};
```

Now:

```
var myColourScheme = {
'blues': new Rainbow().setNumberRange(0, 1).setSpectrum('c0e0e8', '428696'),
'greens': new Rainbow().setNumberRange(0, 1).setSpectrum('c0e8c2', '429756')
};
```