Dash shows only in header in django-dash

Hi,

I downloaded a tutorial from dash website, included it in a django-dash project, but the dash only shows in the top part of my webpage. I tried to add ,style={“margin”:0, “width”:“100%”, “height”: “100%”} to the end of my html.Div, but it didn’t do the trick.

Found the solution, plotly_app defined in the template needs a ratio parameter :

{% plotly_app name=<my_app> ratio=1 %}

plotly_app is set in an iFrame object, ratio represents the height of the iFrame compared to its width. Default value is small, like 0.2.

I am facing same problem. Can you please share your entire html code where you used you solution code?
This is my html code in templates:

{% extends ‘base.html’ %}
{% load static %}
{% block content %}

{% load plotly_dash %}

Correlation Analysis

{% plotly_app name="CorrelationApp" %}

{% endblock content %}

Move the load plotly_dash above the block content.

1 Like