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
Changing the position of the y-axis title

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)?

  • 26458
    Verified Answer
    Offline posted


    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

Reply Children
No Data