core-plot 从轴标签中删除小数点 [英] core-plot remove decimal points from axis labels

查看:20
本文介绍了core-plot 从轴标签中删除小数点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我如何从轴标签中删除小数点?而不是 10.0,我希望只显示 10 个.

Can someone tell me how to remove the decimal points from the Axis labels? Instead of 10.0 I'd like to have only 10 showing.

推荐答案

将轴上的 labelFormatter 属性设置为新的格式化程序.这是一个标准的 NSNumberFormatter 对象.请参阅 Apple 的类文档 了解可用选项的详细信息.

Set the labelFormatter property on the axis to a new formatter. This is a standard NSNumberFormatter object. See Apple's class documentation for details on the options available.

这篇关于core-plot 从轴标签中删除小数点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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