ScottLogic/d3-financial-components — pull request #143 by ColinEberhardt (2014-12-11 11:14:26+00:00)
Title: Volume series is now a more generic bar series.css

+ Assimilated much of our CSS wrt. up / down days
+ Simplified the output SVG for the volume series

The up / down concept which previously involved hard-coded 'open' and 'close' properties has been replaced with a function that can be used to add a class for each bar. The following code produces the same volume series as before:

```
var volume = fc.series.bar()
.xScale(x)
.yScale(y2)
.classForBar( function(d) {
return d.close > d.open ? 'up-day' : 'down-day'
});
```