0
votes

tickDirection can be used to position both ticks and labels on either side of an axis in a Core Plot graph. Is there a way to position ticks and labels on opposite sides of the axis?

I would like to use the ticks as grid lines on the "inside" of the graph, but have the number labels on the "outside" (not unlike the iPhone Stocks app).

(I've experimented a bit with labelAlignment but didn't notice any effect. Not quite sure what it does...)

1

1 Answers

1
votes

You could set the tickDirection so the ticks are on the inside and then use a negative labelOffset to move the labels back to the other side. If that doesn't work (e.g., if the labels are different lengths), you can add a second axis in the same position as the first. Set all line styles on the second axis to nil so it is invisible, attach the labels to it, and position them on the opposite from the ticks on the first axis.