Reshad
Reshad

Reputation: 2652

Setting custom text on top of bar chart

Hello I want to achieve the following.

example

So far everything went good by using the docs. However, I can't seem to set a value on top like € 230 or € 70. When I use the

barChartView.drawValueAboveBarEnabled = true

Because it sets the value of the bar charts ( 70, 30 etc)

Is it possible to do this? :)

Upvotes: 2

Views: 854

Answers (1)

Wingzero
Wingzero

Reputation: 9754

each dataSet has a value formater, use it to format your value like below should be enough:

set1.valueFormatter = [[NSNumberFormatter alloc] init];
set1.valueFormatter.negativePrefix = @"€ ";
set1.valueFormatter.positivePrefix = @"€ ";

Upvotes: 1

Related Questions