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

how to let centerAttributedText line feed in bar chart ? #1304

Closed
Huang-Libo opened this issue Aug 10, 2016 · 3 comments
Closed

how to let centerAttributedText line feed in bar chart ? #1304

Huang-Libo opened this issue Aug 10, 2016 · 3 comments

Comments

@Huang-Libo
Copy link

Huang-Libo commented Aug 10, 2016

I have set centerAttributedText in bar chart, and sometimes the centerAttributedText is too long, so it's covered by bar chart, then I set paragraphStyle's lineBreakMode to NSLineBreakByTruncatingTail, however it did not work. Is there a way to solve the problem?
img_2917

@Huang-Libo
Copy link
Author

Now I manually add line feed when the text is too long..

@danielgindi
Copy link
Collaborator

Or use this: https://github.com/danielgindi/Charts/blob/master/Charts/Classes/Charts/PieChartView.swift#L549
For defining the bounds for the text for word wrapping. :-)

@Huang-Libo
Copy link
Author

That's it! centerTextRadiusPercent property.

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

2 participants