ScottLogic/d3-financial-components — pull request #167 by tlsim (2014-12-16 22:24:46+00:00)
Title: Add series element width function for sizing candlestick/ohlc bars.

For #122

This PR makes the ohlc and candlestick tick/bar widths functions instead of numbers, and provides a default called seriesElementWidth.

The idea of seriesElementWidth is, given a scale, work out how wide a d3 time interval (https://github.com/mbostock/d3/wiki/Time-Intervals) is on that scale. For example, a width of half a day is

```javascript
fc.utilities.seriesElementWidth(d3.time.day, 0.5)(xScale)
```
This function assumes the scale returns Date objects for the domain, so it's not working with datetime scale. #166.