Flot charts, xaxis minimum length

早过忘川 提交于 2019-12-02 10:20:10

One possibility is to provide a number for the ticks option:

ticks: 16

However that is treated only as a guideline; Flot always tries to make the ticks fit, and will reduce the number when it detects that they would overlap or run off the side of the plot. If you really want to force it to use 16 (which I wouldn't recommend, since the labels will probably overlap) you'll need to manually provide an array of ticks:

ticks: [0, 5, 10, ...]

I've cracked it byadding another data set which is 16 in length but has lines:{show:false} set :) job done!

You can use minTickSize according to the documentation of flot.

minTickSize : [1, "day"],
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!