Y 轴始终可见

发布于 2024-10-11 13:49:52 字数 248 浏览 3 评论 0原文

我正在使用 core-plot 绘制一个像后面一样的图表。我想将 Y 轴放在“plotAreaFrame”之外,这样我就可以一直看到它,即使我在 X 轴上滚动时也是如此。

如果不可能的话,你能给我一个线索,让 Y 轴始终可见吗?

alt text

编辑:我可以通过绘制另一个图表并仅显示第二个图表的轴而不显示任何数据来做到这一点它?

I'm drawing a graph like behind using core-plot. I wanted to put de Y axe out of the "plotAreaFrame", like that I'll be able to see it all the time, even when I'm scrolling on the X axe.

If it's not possible could you give me a clue to make the Y Axe always visible.

alt text

Edit: May I do this by drawing an other chart an displaying only the axes of the second graph and no datas on it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浮光之海 2024-10-18 13:49:52
y.isFloatingAxis = YES;

就是那条线!

y.isFloatingAxis = YES;

That was just that line!

中二柚 2024-10-18 13:49:52

在最新版本的 Core Plot 中,isFloatingAxis 不再起作用,但它可以:

y.axisConstraints = [CPTConstraints constraintWithLowerOffset:0];

In the newest version of Core Plot, isFloatingAxis no longer works, but this does:

y.axisConstraints = [CPTConstraints constraintWithLowerOffset:0];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文