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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 c语言,请帮蒟蒻看一个题
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
    • ¥50 成都蓉城足球俱乐部小程序抢票
    • ¥15 yolov7训练自己的数据集
    • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)