【发布时间】:2015-03-06 02:45:34
【问题描述】:
有人知道如何在只有 1 个条目的浮点条形图中定义 x 轴的长度吗?
given in the Flot documentation 有“最小”和“最大”选项,但它们似乎需要绝对值。
默认情况下,x 轴会自动拉伸以适应条目的值。来自文档:
The options "min"/"max" are the precise minimum/maximum value on the
scale. If you don't specify either of them, a value will automatically
be chosen based on the minimum/maximum data values.
在只有一个条目的图表上,条形图一直延伸到 x 轴的整个范围,这看起来显然是错误的!
【问题讨论】:
-
你说的是y轴还是x轴? y 轴大于给定示例中的最大值。即 250 与 216
-
x 轴 - 抱歉.... 已编辑问题!