weixin_33724059 2015-07-09 09:01 采纳率: 0%
浏览 24

播放框架刷新渲染

I have a controller that sends lists via render(list1,list2,list3);, and then plots the results using Flot Charts. I'd like to plot them as "real-time" charts, but I know it's a bit tricky. These lists are extracted from a database, a database that is not "finished" (as the simulation goes on, new data is added). Therefore, when I render the lists, they do not have all the values, as they only have the values at a particular instant.

I wonder what would be the easiest way to obtain this updating data. After putting so much thought, and realising that Play has nothing to do with PHP, I've had an idea, and I want to know if it is possible:

My idea is using AJAX or something similar in order to refresh the page (render again the data) every "x" seconds, and creating a "fake impression" of real-time plots. By doing that, I hope that the lists get updated and I can plot them as if it were real-time.

How can I do that in my views .html file and controller? Is there any other way of doing that without the need to refresh? Thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?