Maa*_*aat 2 jquery height space flot
如何在图表顶部创建更多空间?
现在我明白了:

但我想要这个:

这是我的JS代码:
$("table.chart").each(function() {
var colors = [];
$("table.chart thead th:not(:first)").each(function() {
colors.push($(this).css("color"));
});
$(this).graphTable({
series: 'columns',
position: 'replace',
width: '100%',
height: '200px',
colors: colors
}, {
xaxis: {
tickSize: 1
}
});
});
Run Code Online (Sandbox Code Playgroud)
Mar*_*ark 10
调整autoscaleMarginy轴的属性.来自API:
"autoscaleMargin"有点深奥:它是缩放算法将添加的边距的一部分,以避免最外面的点最终在网格边界上.请注意,此边距仅在未明确设置最小值或最大值时应用.如果指定了边距,则绘图还将轴终点延伸到最接近的整个刻度.对于x轴,默认值为"null",对于y轴,默认值为0.02,这似乎适合大多数情况.
听起来像从默认值0.02上升它会做你想要的.