I have a code which refresh chart when window change size:
$(window).resize(function () {
plot.replot({ clear: true, resetAxes: false });
});
But I would like to move legend down on small screens. Is this possible with 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" } }); }
});