0
votes

I have plotted a Bar Graph using core-plot.

I have enabled scrolling in X-Axis direction. The problem that I am facing is that when I scroll the labels on the Y-Axis also start to scroll

this is the image without scrolling

This is what happens when I scroll

The Y-Axis gets hidden,I want to hide the labels on Y-Axis also when I scroll.

2

2 Answers

0
votes

You can lock the y-axis in place by positioning it using the axisConstraints rather than the orthogonalCoordinate. Set it a fixed distance from the edge of the graph and it won't move when the graph scrolls.

If you want the labels to disappear when the user scrolls past a certain point, use a plot space delegate to monitor changes to the plot space and hide the labels when the plot ranges go outside the desired range.

0
votes
axisSet.yAxis.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
 axisSet.xAxis.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];