0

我有一个代码在窗口更改大小时刷新图表:

$(window).resize(function () {
     plot.replot({ clear: true, resetAxes: false });
});

但我想在小屏幕上向下移动图例。jqPlot 可以吗?

4

1 回答 1

0
 $(window).resize(function () {
        if (window.innerWidth < 700) { plotgraph.replot({ resetAxes: true, legend: { placement: 'insideGrid', location: "s", rowSpacing: '2px' } }); }
        else { plotgraph.replot({ resetAxes: true, legend: { placement: 'outsideGrid', location: "ne" } }); }
    });
于 2016-02-09T11:12:12.297 回答