On iOS core plot, my data comes in real time and I want it to scroll to the left while the data is ticking in. I also would want user to be able to pan horizontally while always seeing the y-axis visible on the left. From some googling it seems like there used to be isFloatingAxis property on CPTAxis but that's no longer there. What should I do? I don't think setting constraint is what I need because I do want free horizontal scrolling to see some data to the right and left.
OK I do see that constraint is just what I need. In CorePlotGallery
under example directory there is a CurvedScatterPlot
example which shows how to do it. I can get CPTXYAxis off the axisSet and set axisConstraints:
CPTXYAxis *y = axisSet.yAxis;
y.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
And it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With