iRareMedia/BarChart — pull request #7 by emichaud (2013-09-06 04:19:31+00:00)
Title: Enhancements to BarViewDelegate and added new helper class BarChartModel

Hi,

Hope I did this correctly. If not, any tips on github and pull requests are welcome.
Sorry for the amount of modifications, I didn't really mean to add touch your code, but I found one bug in the delegate model and also wanted to extend it a bit for more capability.

The bug was in the init and setup of a bar. The delegate was getting set outside of the creation loop rather then once for each bar.

I extended BarView.h to include the label and index property so they can be passed through to the delegate.
I modified the BarView setup process to set those properties.

Added BarItem, which is used internally in BarChartModel.
Added ColorChart.h which is used to set bar colors.
Added BarChartModel which is a wrapper that adds convenience methods for easily creating bar charts. It handles the delegation and provides several block based api for configuring charts and for extending bar item "did select" actions.

Modified the demo iphone storyboard to include a tabbar controller and two examples showing how to use BarChartModel.

Please review this and let me know if you have any concerns. If this direction is something you will accept, let me know and I'll add another pull that cleans up the logging and adds documentation.

best regards,
Everett