jqPlot滴答,没有小数 [英] jqPlot ticks without decimals

查看:156
本文介绍了jqPlot滴答,没有小数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jqplot,它默认得到这样的标记:

I am using jqplot, and it gets marks by default like this:

如果没有 .0 ,我应该怎样做才能获得它结束?

What should I do to get it without .0 at the end?

推荐答案

因为确实是答案我会将其作为实际发布。

Since it was indeed the answer I'll post it as an actual one.

使用 stringFormat ,您可以格式化轴标签的字符串,并使用 sprintf 表示法,其中%d 是有符号整数。由于整数没有小数,可能就是你想要的。

With stringFormat, you can format the string of the axis labels, and it uses sprintf notation, where %d is a signed integer. Since integers do not have decimals, it is probably what you want.

这篇关于jqPlot滴答,没有小数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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