我正在使用flot向我的页面添加图表。我希望图表可以调整大小并在y轴上有标签。那两个工作分别很好但是没有在一起....当我在轴上有标签并试图调整标签大小越来越多'空间'
我的HTML:
<div id ="ResizableContainer" class="ui-widget-content" style="width:900px;height:600px;">
<div id="placeholderForGraph" class="graph-placeholder" ></div>
我的js:
var options = {
lines: { show: true },
points: { show: true },
grid: { hoverable: true, clickable: true },
xaxis: { mode: "time", timeformat: "%y/%m/%d %H:%M:%S" },
yaxis: {
axisLabel: obj[0].Unit,
axisLabelUseCanvas: true,
axisLabelFontSizePixels: 15,
axisLabelFontFamily: "Verdana, Arial, Helvetica, Tahoma, sans-serif",
axisLabelPadding: 15,
}
};
$("#placeholderForGraph").text('');
$("#ResizableContainer").show();
$("#placeholderForGraph").plot([data], options);