jQuery Mobile和Flot库 [英] jquery mobile and flot library

查看:89
本文介绍了jQuery Mobile和Flot库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个小型jquery移动框架站点中实现flot.包含flot的页面/内容div位于辅助页面上.第一次显示浮点页面时,图表呈现效果很好.回到主页面,再回到浮点页面,该图表将不呈现.

I am implementing flot in a small jquery mobile framework site. The page / content div that contains the flot is on a secondary page. The first time the flot page is shown, the chart renders nicely. Moving back to the primary page and forward again to the flot page, the chart does not render.

内容来自ASP MVC视图:

The content is coming from an asp mvc view:

<div id="chartcontainer">
    <div id="chartdiv" style="height:300px;width:400px;"></div>
</div>
<script type="text/javascript">
$(function () {
    var d1 = [[1, 1], [2, 2], [3, 3]];
    $.plot($("#chartdiv"), [d1]);
});
</script> 

推荐答案

您可能需要刷新页面,请尝试.page()

You might need to refresh the page, try .page()

$.plot($("#chartdiv"), [d1]).page();

这篇关于jQuery Mobile和Flot库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆