Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
Changing the position of the y-axis title
posted

I have a chart with two y-axes, one on each side. The titles for both y-axes show up on the left side of the axis - this makes sense for the left axis, but not the right one, since it puts the title on the inside of the chart.

How can I move the location of the title on the right-side y-axis to the right of the labels (outside the chart)?

Parents
No Data
Reply
  • 26458
    Verified Answer
    Offline posted

    Hi,

    Looks like the public property to set the title location is missing from the chart. We'll add that in.
    In the meantime you can do this:

        NSObject *internalAxis = [y2Axis performSelector:NSSelectorFromString(@"getAxisRef")];

        NSObject *titleSettings = [internalAxis performSelector:NSSelectorFromString(@"titleSettings")];

        [titleSettings setValue:[NSNumber numberWithInt:2] forKey:@"position"];  //2 is the enum value for Right

Children