CorePlot 与 swift:没有 yAxis.majorIntervalLength [英] CorePlot with swift: there is no yAxis.majorIntervalLength

查看:28
本文介绍了CorePlot 与 swift:没有 yAxis.majorIntervalLength的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的图表的样子:

我不想让 y 轴的间隔为 50,所以我尝试这样做:

var axisSet: CPTXYAxisSet = CPTXYAxisSet(layer: graph.axisSet)var y = axisSet.yAxisy.majorIntervalLength = 50

但是majorIntervalLength 似乎不存在

解决方案

Swift 不支持 NSDecimal 值.我们对 Core Plot API 进行了一些更改,将 NSDecimal 替换为 NSDecimalNumber.更改位于 release-2.0 分支上,尚未在发布包中.有关该问题的更多讨论,请参阅核心图问题 #96.>

Here is how my graph looks like:

I wan't the y axis to have an interval of 50 so i try doing this:

var axisSet: CPTXYAxisSet = CPTXYAxisSet(layer: graph.axisSet)
var y = axisSet.yAxis

y.majorIntervalLength = 50

But majorIntervalLength doesn't seems to exist

解决方案

Swift doesn't support NSDecimal values. We've made some changes to the Core Plot API, replacing NSDecimal with NSDecimalNumber. The changes are on the release-2.0 branch and not in a release package yet. See Core Plot issue #96 for more discussion of the issue.

这篇关于CorePlot 与 swift:没有 yAxis.majorIntervalLength的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆