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

Appending Units(i.e. m/s, mpg, etc) to yaxis?? #2394

Closed
thxu93 opened this issue Apr 26, 2017 · 3 comments
Closed

Appending Units(i.e. m/s, mpg, etc) to yaxis?? #2394

thxu93 opened this issue Apr 26, 2017 · 3 comments

Comments

@thxu93
Copy link

thxu93 commented Apr 26, 2017

Hey I was wondering if there was a way to append units to my y axis? not the data points but on the y axis. I've been looking through these issues and I can't seem to find any.
I'm working with a line chart btw

Cheers,
Thomas

@thxu93 thxu93 closed this as completed Apr 26, 2017
@linfeng
Copy link

linfeng commented Jun 27, 2017

how to di it?

@coolcool1994
Copy link

coolcool1994 commented Jan 8, 2018

NSNumberFormatter *leftAxisFormatter = [[NSNumberFormatter alloc] init];
leftAxisFormatter.maximumFractionDigits = 1;
leftAxisFormatter.negativeSuffix = @" cal";
leftAxisFormatter.positiveSuffix = @" cal";

ChartYAxis *leftAxis = self.caloriesBurnedChartView.leftAxis;
leftAxis.valueFormatter = [[ChartDefaultAxisValueFormatter alloc] initWithFormatter:leftAxisFormatter];  

@bolee
Copy link

bolee commented Jun 29, 2018

@coolcool1994 I want to replace xAxis last label by unit, Charts could do it?

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

4 participants