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

Can't set text of Legend? #1027

Closed
Maxcucurbit opened this issue May 13, 2016 · 3 comments
Closed

Can't set text of Legend? #1027

Maxcucurbit opened this issue May 13, 2016 · 3 comments

Comments

@Maxcucurbit
Copy link

Maxcucurbit commented May 13, 2016

Only by this way:
set1 = [[BarChartDataSet alloc] initWithYVals:yVals label:_legendText];
Have a better way to set text of legend?such as chartView.legend.text = @“xxxx”.

@128keaton
Copy link

@Maxcucurbit I don't think so. Why would setting that way cause an issue?
(set1 = [[BarChartDataSet alloc] initWithYVals:yVals label:_legendText];)

@Eflet
Copy link

Eflet commented May 13, 2016

You can use this:
[chart.legend setExtraWithColors:@[UIColor.redColor] labels:@[@"testLegend"]

@Maxcucurbit
Copy link
Author

@Eflet my bad, thanks

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

3 participants