문제

In my application I have a core-plot graph. The labels of the x-axis display in the graph area. This is a capture:

enter image description here

I don't know what is wrong. I'm using expandRangeByFactor for yRange with this code

[yRange expandRangeByFactor:CPTDecimalFromCGFloat(2.1f)];

But the problem is that when the data changes, the x-axis labels move up or down. I don't understand this behavior.

Is possible to fix the x-axis labels to one position, always at the bottom of graph.

Thank you in advance.

도움이 되었습니까?

해결책

It's hard to tell what's wrong without seeing your code, but you could try setting an axis constraint on the x axis:

CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet;
axisSet.xAxis.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top