AJax技术

jqplot 实用技巧——重绘

字号+ 作者:H5之家 来源:H5之家 2017-07-25 13:01 我要评论( )

《jqplot 实用技巧——重绘》和jquery相关,jquery是电脑编程中的一个重要分支,电脑编程网为您提供《jqplot 实用技巧——重绘》的最完整详细正文阅读!

jqplot 实用技巧——重绘

作者:xianbin 和jquery相关  

技巧一:
当浏览器窗体大小改变时:
$('#resizable1').bind('resize', function(event, ui) { plot1.replot( { resetAxes: true } ); });

技巧二:
重新加载数据进行重绘时:
chartObj.series[0].data = [[0, 4], [1, 7], [2, 3]]; chartObj.replot();

技巧三:
改变plot的ticks:
plot.axes.yaxis.reset(); plot.axes.yaxis.ticks = new_yticks; plot.replot();

技巧四:
浏览器窗体大小变更后指定图表大小:
$('#resizable2').bind('resizestop', function(event, ui) { $('#chart2').height($('#resizable2').height()*0.96); $('#chart2').width($('#resizable2').width()*0.96); plot2.replot({resetAxes:true}); });

技巧四:
浏览器窗体大小变更后重置BarChart图表的bar(柱子)大小:
$.each(plot.series, function(index, series) { series.barWidth = undefined; }); plot.replot({ resetAxes : true });

相关资料:

jqplot 实用技巧——重绘来源网络,如有侵权请告知,即处理!

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
网友点评