angular-charts
angular-charts copied to clipboard
Refactor chart functions + 3 new charts
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
//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, horizontal);
//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
Added 3 new charts, bar-stacked, slab, and slab-stacked. Updated the getGraph() function to work with horizontal graphs Changed xAxisLabelRotation to use positive or negative numbers the same way
What else needs to be done to get these updates into a release?
About stacked charts: Stacked chart labels are hidden if they do not fit within the section