jqPlot resize bar charts

To make a jqPlot bar chart resizeable, you need to do this:
$(window).on('resize', function () {
$.each(chart.series, function(index, series) {
series.barWidth = undefined;
});
});

where "chart" is the object returned by $.plot when initializing the plot.

Comments

Popular posts from this blog

Top things to do after installing Manjaro KDE

PIP - upgrade all packages from requirements.txt (interactively)

Compare integer variable in django templates