ウィンドウのサイズが変更されたときにチャートを更新するコードがあります。
$(window).resize(function () {
plot.replot({ clear: true, resetAxes: false });
});
しかし、小さな画面では凡例を下に移動したいと思います。これはjqPlotで可能ですか?
ウィンドウのサイズが変更されたときにチャートを更新するコードがあります。
$(window).resize(function () {
plot.replot({ clear: true, resetAxes: false });
});
しかし、小さな画面では凡例を下に移動したいと思います。これはjqPlotで可能ですか?
$(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" } }); }
});