Flot:显示特定的刻度标签 [英] Flot: Displaying specific tick labels

查看:78
本文介绍了Flot:显示特定的刻度标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个浮点图,其y轴坐标为55、110、220、440、880、1760.

I have a flot graph with y-axis co-ordinates to be 55, 110, 220, 440, 880, 1760.

我希望显示所有六个刻度,但是我不想显示刻度标签55和1760.

I want all the six ticks to be displayed but I donot want the tick label 55 and 1760 to be displayed.

是否可以通过油量表?

感谢

推荐答案

在您的选项中,传递一个ticks数组,在这些位置带有一个空标签:

In your options pass a ticks array with an empty label at those positions:

yaxis: {
  ticks: [[55, ""], [110, "label"], [220, "label"], [440, "label"], [880, "label"], [1760, ""]]
}

小提琴此处.

这篇关于Flot:显示特定的刻度标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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