Partially filled bar
iDevelopper opened this issue · comments
Patrick commented
Terry Worona commented
Yes, totally possible - but requires a bit of work.
You'll have to supply a custom UIView for each bar via:
- (UIView *)barChartView:(JBBarChartView *)barChartView barViewAtIndex:(NSUInteger)index
Then, customize each bar by drawing only certain components (ie. red, green, etc).
Hope this helps.
Patrick commented
Thank you very much !
I had a doubt about this :
- @return A UIView subclass. The view will automatically be resized by the chart during creation (ie. no need to set the frame).
Terry Worona commented
Yeah, the bar's width and height will be automatically resized to correlate with the chart's frame and number of data points.
Your custom UIView should be able to lay itself out with any kind of frame.
Patrick commented
Ok, I see, thank you