plotly-dash - 长时间运行时在浏览器上显示旋转的轮子/圆圈图像
问题描述
在布局表单button
上单击 a时,选项卡(无论如何)显示“正在更新”。我想给出更明显的反馈,说明操作正在运行。dash
browser
Chrome
在破折号回调中长时间运行计算期间显示旋转轮图像的规范方法是什么?
# This is a long running operation
@app.callback(
dash.dependencies.Output('datatable-optionchain','children'),
[dash.dependencies.Input('button', 'n_clicks')],
#[dash.dependencies.State('input-box', 'value')],
[dash.dependencies.State('dropdown1', 'value'),
dash.dependencies.State('my-date-picker-single', 'date'),
dash.dependencies.State('dropdown2', 'value')],
)
def update_output(n_clicks, svalue, dtvalue, tvalue):
#How do I put a spinning wheel here to advise user we are working on it?
解决方案
这有很大帮助。我无法让纺车工作,但我确实让.css
版本工作。尽管有一些不一致的地方:
推荐阅读
- python - 按下一个键会创建一个循环,直到您按下另一个键
- function - Haskell Recursion - 如何使用原始值调用另一个函数但只调用一次
- python - 如何使用 Matplot.lib 在动画图中使用图像而不是标记
- javascript - 使用 eslint-typescript 和 Express 出现任何值错误时不安全的成员访问 .body
- git - 如何解决“推送”问题?
- command - SCP 命令在空手道项目中不起作用 - 它引发命令错误:无法运行程序 scp.exe:CreateProcess 错误 = 2
- oracle - 在 Oracle 中调用以 $ 字符开头的值
- linux - 使用 cut 组合 csv 文件以选择一列并粘贴以组合文件
- python - 如何在 Django Rest Framework 中为基于函数的视图添加过滤
- ios - 过多的脏内存