سؤال

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