Frage

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.

War es hilfreich?

Lösung

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];
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top