Show Value on Bar Graph


Hi All,

I’m trying to show value on my bar graph on top. Can you please help me on this.

More Detais:

SChartBarSeries *colseries = [SChartBarSeriesnew];

colseries._style = [self.themebarSeriesStyleForSeriesAtIndex:3selected:NO];

Need to show value on top of bar,







Your question is a little unclear - are you looking to add a numeric label to each bar? If so, this has been discussed previously:

You can achieve this using annotations.

Regards, Colin E.


Thank you Colin for quick response…!!

Yes exactly, I tried with the post you suggested and i’m nearer.

I have 5 vertical bar with different y-axis. Now on each top bar, i need to annote its exact y-axis value.

Image is Edited - here i have add 800 on top of bar.

Value on bar


Hello Everyone,

Can you tell me how set annotation on center of bar?


Have you taken a look at the thread Colin linked to? That explains how to position the annotations - they accept x and y coordinates, so to put them in the middle of the column you could just set the y-value to half the data point y-value:

SChartAnnotation *a = [SChartAnnotation annotationWithText:[NSString stringWithFormat:@"%d",[dp.yValue intValue]]
                                              andYPosition:@([dp.yValue floatValue] / 2)
                                             withTextColor:[UIColor blackColor]
                                       withBackgroundColor:[UIColor clearColor]];