坐标图,x轴最小长度 [英] Flot charts, xaxis minimum length

查看:75
本文介绍了坐标图,x轴最小长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

float折线图中的xaxis可以获取最多不超过16个但长度不超过16个数据的数组.问题是当我的数据小于16时,无论数据数组的长度是多少,x轴都会展开以显示最大值.

The xaxis in my flot line charts can take an array of data up to but no more than 16 in length. The problem is when my data is less than 16, the x axis is spreading out to show the maximum value of whatever the length of the data array is.

即使我的数据长度为4,我仍然希望在x轴上显示16点.

Even if my data is say 4 in length, i'd still like to show 16 points on the xaxis.

我尝试了各种配置,但似乎没有任何效果:(

I have tried various configs and nothing seems to be working :(

http://www.discussthemarket.com/ratings/

下方的图表的x轴大于顶部附近的图表,x轴中的数据较少.我想在x轴上始终使用固定长度16,但确实很费劲.

The graphs lower down have an x axis greater than the graphs nearer the top which have fewer items in the data. I'd like to consistently apply a fixed length of 16 to the x axis but am really struggling.

推荐答案

我通过添加另一个长度为16但有行的数据集来破解它:{show:false} set :)工作完成了!

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

这篇关于坐标图,x轴最小长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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