Make a Bar Chart on iPhone
I'm new to iPhone and 开发者_如何学CI want to make a rectangle portion to show coordinate. It's just like one bar, when you change the value in options and the percentage of the bar change too. Can anyone help me? Thanks.
Use UIProgressView or Google chart api.
CGRect CGRectMake( float x, float y, float width, float height )
x & y are fixed width and height depends on your bar-orientation , calculate the length of the bar on yourself
You can look at DSBarChart. A simple Objective-C Bar Chart / Histogram library.
And here is the sample usage
It is exactly what you want.
精彩评论