简体   繁体   English

IOS Core-Plot:如何获取X和Y轴的可见范围

[英]IOS Core-Plot: How to get visible range of X and Y axis

In Core-Plot I want to plot only the visible area of the plot. 在Core-Plot中,我只想绘制绘图的可见区域。 For this I need the visible range of the plot after Zoom-In and Zoom-Out. 为此,在放大和缩小之后,我需要绘图的可见范围。

Any Idea how to get visible range of X-Axis? 任何想法如何获得X轴的可见范围?

You can use a plot space delegate to find out when the plot ranges change. 您可以使用绘图空间委托来找出绘图范围何时更改。 Each delegate method receives a reference to the plot space as one of its parameters. 每个委托方法都将对绘图空间的引用作为其参数之一。 You can read the xRange and yRange to find out what the new ranges are. 您可以阅读xRangeyRange来找出新范围。

您可以使用以下代码获取X轴的可见范围: space.graph.axisSet.xAxis.visibleAxisRange

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM