简体   繁体   English

在 Django 模板中渲染 plotly 破折号

[英]rendering plotly dash in Django template

I am using https://django-plotly-dash.readthedocs.io/en/latest/ to serve my plotly dash in Django.我正在使用https://django-plotly-dash.readthedocs.io/en/latest/在 Django 中为我的 plotly dash 提供服务。 At the moment the chart is rendered ok in my template.目前,图表在我的模板中呈现正常。 However, it displays very small, I try to adjust the size of the div but it doesn't seem to work.但是,它显示的非常小,我尝试调整 div 的大小,但似乎不起作用。

 {%load plotly_dash%} <div style="height: 100%; "> {%plotly_app name="simple_example" %} </div>

Got it fixed with the help of Github DocGithub Doc的帮助下修复了它

 {%load plotly_dash%} <div class="{% plotly_class name="simple_example"%}"> {% plotly_app name="simple_example" ratio=1 %} </div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM