jQuery - Flot图表仅显示1个图表

时间:2015-10-09 04:16:25

标签: javascript jquery flot

这是我拥有的数据(由2个图表代表的2个对象的数组)

Flot's plot

非常普通的$.plot($("#Profits"), profit_data, { lines: { show: true }, legend: { show: true }, points: { show: true }, grid: { show: true, hoverable: true, clickable: false, borderColor: '#cccccc' }, xaxis: { min: (new Date(data.min)).getTime(), max: (new Date(data.max)).getTime(), mode: "time", timeformat: "%b", tickSize: [1, "month"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], tickLength: 0, // hide gridlines axisLabel: 'Month', axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif', axisLabelPadding: 5 }, yaxis: { axisLabel: 'Profits (%)', axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif', axisLabelPadding: 5 } }); 函数调用

{{1}}

但由于某种原因,它只绘制了1个图表,即使图例框显示有2个图表。见照片:

enter image description here

我在这里缺少什么?

0 个答案:

没有答案