将Dash布局保存到html [英] Saving Dash layout to html

查看:241
本文介绍了将Dash布局保存到html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以短划线布置了很多东西.我想将它们保存到html文件中,以便稍后查看.当我重新打开保存的html文件时,我首先会正确看到所有内容.但是,在< 1s内,页面变为空白,并且出现错误:加载布局错误". (请参见下面的gif)

I plotted a bunch of things in a dash layout. I want to save them to an html file so I can look at them later. when I reopen the saved html file, I first see everything correctly. However, within <1s, the page goes blank and I get an error: "Error loading layout". (see gif below)

如何解决?

谢谢!

推荐答案

此解决方案无法完全正常工作:

This solution is not fully working:

您必须保存完整的网页.
为了防止javascript创建任何错误 我已经删除了 bundle(2).js 文件.

You have to save your Webpage complete.
To prevent the javascript creating any errors i have removed the bundle(2).js file.

此文件包含函数dash_renderer,该函数尝试与服务器进行交互并产生问题.

This file contains the function dash_renderer which tries to interact with the server and creates issues.

<footer>
<script id="_dash-config" type="application/json">{"url_base_pathname": "/", "requests_pathname_prefix": "/"}</script>
<script src="./Dash_files/react.min.js"></script>
<script src="./Dash_files/react-dom.min.js"></script>
<script src="./Dash_files/bundle.js"></script>
<script src="./Dash_files/plotly-1.38.0.min.js"></script>
<script src="./Dash_files/bundle(1).js"></script>
<!-- <script src="./Dash_files/bundle(2).js"> --></script>
</footer>

结果与您在约1秒钟内看到的页面相同.

The result is the same page as you can see for ~1s.

最大的缺点:与情节的互动丧失了.

这篇关于将Dash布局保存到html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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