Reputation: 109
I have a graph that shows labels only on major ticks. I tried to show the minor tick labels after a certain level of zoom-in but I encountered an issue. At first all seemed to work well, then I zoomed-in really fast and the minor ticks in the visible axis range disappeared. I'm using Core-Plot 1.5.1
The first picture shows the graph with no zoom at all:
The second one is the graph with a correct zoom - it shows a minor tick label of 42:
Then I zoomed fast and then the label at 42 disappeared:
The purpose of the last screenshot is to further clarify what the issue is - I zoomed-in fast, then zoomed-out a bit and the minor tick labels were gone.
I'll be grateful for any suggestion for this problem.
Best regards,
Boyan
Upvotes: 1
Views: 867
Reputation: 27381
"Fixed Interval" means exactly that—the intervals between the ticks don't change no matter the scale of the plot space. If you want the labels to change as you zoom in and out, you have a couple of options:
Use the automatic labeling policy. This policy changes the intervals dynamically to keep a certain number of ticks within the axis range.
Use a plot space delegate to monitor changes to the plot space. Update the majorIntervalLength
and/or labelingOrigin
as needed to keep a reasonable number of ticks visible.
Upvotes: 1