chinmaymk/angular-charts — pull request #137 by chaosfinity (2014-09-18 21:44:36+00:00)
Title: Refactor chart function storage

Created a new provider to hold chart functions at the same time creating an API to insert custom charts at module config using:
```javascript
acChartLogicProvider.addChart('type', chartFunction[, legendFunction]);

// Chart Function
acChartLogicProvider.addChart('type', function(config, box, domFunctions, series, points){
//config = config from directive
//box = structure from directive {height, width, chartContainer, legendContainer, legend = []}
//domFunctions = event functions to keep scope out of acChartLogic
//series = series from directive
//points = points from directive
//this = acChartLogicProvider
});

// Legend Function
acChartLogicProvider.addChart('type', chartFunction, function(config, box, series, points, $sce){
//All the same from above
//this = acChartLogicProvider
});
```

I have not written documentation for this yet, documentation takes time and I wanted to get everyone's opinion on this before I dedicate the time to write the documentation.

Additional improvements I would like to make:
* Separate repeated logic in charts, such as creating the axis lines, into helper functions on the provider
* Add Config option for bar charts to continue color index onto the next data set

What I hope this will do:
* I think this will speed up production on new charts
* Invite more advanced users to use this library instead of creating their own d3 directives for custom charts

I hope this is a welcome improvement, I don't want to step on any toes but I would like to help with further development of this library since I use it quite frequently in my business focused applications