`
edison87915
  • 浏览: 199470 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

HOW TO MAKE JQPLOT RESPONSIVE

 
阅读更多

HOW TO MAKE JQPLOT RESPONSIVE

jqPlot is a plotting and charting plugin for the jQuery Javascript framework. jqPlot produces beautiful line, bar and pie charts with many features.

To make JqPlot responsive we need to replot() the graph on change on window size. Here is how you should do it…

Using the replot() function this can be achieved, as done at this fiddle link. Read more on replot andredraw from here.

 

$(document).ready(function(){
    plot1 = $.jqplot ('chart', [[3,7,9,1,4,6,8,2,5]]);
    window.onresize = function(event) {
        plot1.replot();
    }
});

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics