chinmaymk/angular-charts — pull request #149 by chaosfinity (2014-09-25 22:05:31+00:00)
Title: Refactor chart functions

Here's another big one, the diff makes my head hurt.

And the list:
* Pulled default colors into the provider to allow application level override
* Commented all new functions in the provider
* Refactored repeated code into helper functions
* Created a getGraph() function to create graph type charts

getGraph() example
```javascript
//Create your Axes
var x = d3.scale.ordinal()
.domain(['Label', 'Label'])
.rangePoints([0, 1])
;
var y = d3.scale.linear()
.range([1,0])
.domain([0,1])
;
// fetch the Graph
var graph = acChartLogicProvider.getGraph(config, box, x, y);
//Returns
graph = {
xAxis, // d3.svg.axis()
yAxis, // d3.svg.axis()
svg, //Chart svg
xAxisSelection, //Selection for drawn xAxis
yAxisSelection //Selection for drawn yAxis
}
```

I'll begin working on documentation for the provider API as soon as this is decided on