Jawbone / JBChartView

iOS-based charting library for both line and bar graphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Partially filled bar

iDevelopper opened this issue · comments

Hello,

How can i partially fill a bar ?

Like this ;

barsample

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.

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).

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.

Ok, I see, thank you