在条形图和折线图的x和y轴上仅放置整数-Flot [英] Put only integers in x and y axis of bar and line graphs - Flot
问题描述
在Flot.js中,默认情况下,条形图和折线图以数字作为x和y轴上的坐标.
如何使坐标成为仅数字或至少可见的整数?
从
因此,在图形选项中,您可以这样指定: 在此处查看其工作方式: http://jsfiddle.net/ryleyb/g2CTz/ > In Flot.js, bar graphs and line graphs have numbers as the coordinates in the x and y axis by default. How can you make the coordinates such that the numbers are only integers or at least only the integers are visible? Check out the Alternatively, you can specify that you just don't want ticks at a
size less than a specific tick size with "minTickSize". So in your graph options, you would specify it like this: See it working here: http://jsfiddle.net/ryleyb/g2CTz/ 这篇关于在条形图和折线图的x和y轴上仅放置整数-Flot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!$.plot($('#placeholder'),data,{
//your options,
xaxis: {
minTickSize: 1
}
});
minTickSize
option from the documentation:
$.plot($('#placeholder'),data,{
//your options,
xaxis: {
minTickSize: 1
}
});