Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially filled bar #186

Closed
iDevelopper opened this issue Sep 15, 2015 · 4 comments
Closed

Partially filled bar #186

iDevelopper opened this issue Sep 15, 2015 · 4 comments

Comments

@iDevelopper
Copy link

Hello,

How can i partially fill a bar ?

Like this ;

barsample

@terryworona
Copy link
Collaborator

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.

@iDevelopper
Copy link
Author

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

@terryworona
Copy link
Collaborator

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.

@iDevelopper
Copy link
Author

Ok, I see, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants