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

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

问题描述

以下是我的图表:



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

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

y.majorIntervalLength = 50



但majorIntervalLength似乎并不存在

解决方案

Swift不支持 NSDecimal 值。我们对Core Plot API进行了一些更改,用 NSDecimalNumber 替换 NSDecimal 。这些更改在 release-2.0 分支上,而不是在发行包中。有关此问题的更多讨论,请参阅核心剧情问题#96 。 p>

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 with swift:没有yAxis.majorIntervalLength的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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