I know label rotation is not supported in ios-charts. Any issue asking for this is promptly closed however this is a very basic feature. I've seen people posts about how to do it in MPAndroidChart (which this is based on) but those solutions appear to be Android specific. Does anyone know of a way to get 45 or 90 degree labels rotations for a bar chart in iOS-charts?
Asked
Active
Viewed 4,346 times
3
-
take a look at http://stackoverflow.com/questions/10289898/drawing-rotated-text-with-nsstring-drawinrect and http://stackoverflow.com/questions/30089756/rotating-nsstring-in-swift – Wingzero Oct 13 '15 at 01:56
-
thanks, while good for rotating text in general, it doesn't really help in this specific framework, which is what I'm trying to do. – rjb101 Oct 13 '15 at 19:11
-
They share the same strategy, why won't it work? All using CG – Wingzero Oct 14 '15 at 01:36
-
the problem is I don't see individual labels exposed via the API, maybe if I start hacking the framework then yes I could use standard methods – rjb101 Oct 18 '15 at 09:14
2 Answers
4
First - let me emphasize that you are very wrong:
- MPAndroidChart existed for a long time without any issue about rotating x-axis labels, so there wasn't a need for anyone.
- In ios-Charts there was one issue about it, tagged as a feature request, and pending until yesterday (Oct 11). There was one other opened recently, marked as duplicate issue.
Secondly:
I've implemented this feature in the latest master
. Please pull from master
until there's a version release.

daniel.gindi
- 3,457
- 1
- 30
- 36
-
-
-
-
-
As I've said: "Please pull from master until there's a version release." – daniel.gindi Oct 28 '15 at 20:42
-
Hello. Is there any possibility to make the label multiline? I really need to show really long texts as the description of the xAxis of the HorizontalBarChart and even worse is the fact that I need it to be located to the left from the chart itself. Adding a long text just shifts and compresses the chart – AOY Jul 13 '16 at 11:03
-
-
2