python小菜 2015-06-16 13:46 采纳率: 0%
浏览 29

JQuery.load高图

I have done a search around and found some similar questions, but nothing specificly solutionary to what I need.

I need to periodically refresh my Highchart so it pulls through updated data and displays accurate information to the user. The page is displayed on a TV that is left on all day for reporting purposes.

To save the nastiness of a periodic full page refresh I place each element on a different page and then load/refresh periodically with JQuery.load()

What I want to do then is continue that trend, placing the Highchart on a seperate page and peridodically pulling it through for a seamless updating process.

When I try and "load" the URL that contains the chart it brings through the heading but not the actual graph.

Do anybody know the best way to pull through a loaded graph? perhaps Ajax? but not 100% sure what I would need to use.

Thanks,

Ryan.

An example of the script that works on other elements:

var URL = '/technical/support-dashboard-swyx';
$('#tspeople').load(URL + ' #tscalls');
}

loadswyx();
setInterval(function() {
    loadswyx()
}, 1000);
  • 写回答

1条回答 默认 最新

  • weixin_33716557 2015-06-16 13:59
    关注

    How about using iframe? Then you should be able reload it with js using this code.

    var iframe = document.getElementById('youriframe');
    iframe.src = iframe.src;
    

    If you want to reload only data, which you have with ajax - use http://www.highcharts.com/docs/working-with-data/live-data

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向