oesmith/morris.js — pull request #102 by tiraeth (2012-11-01 18:43:32+00:00)
Title: Added support for 2- and 3-color gradients in Morris.Bar

As I mentioned yesterday, the supporting code is in this PR.

Allowed strings for `@options.barColors` array, beside single color strings and regular gradient strings from `Raphael.attr` method, are:

`colorA;colorB` - creates vertical gradient from `colorA` to `colorB`
`colorA;colorB;colorC` - creates vertical gradient from `colorA` to `colorC` through `colorB`

Note that `colorX` string can be any string parseable by `Raphael.color` and gradients created using above format are interpolated using `@ymax` value.

For example, if you create a gradient from white to black and `@ymax = 100`, a bar with `y = 50` will get gradient from gray to black.

**This PR is backward-compatible, so you don't have to worry that your charts stop working.**