When my page loads it displays the graph as a set of characters of the sort. See image below
When I click F12 it shows the second image, just partially rendering the graph. See image below:
I am not sure where I went wrong, below is my code:
from plotly.offline import plot
import plotly.graph_objects as go
def home(request):
"""Renders the home page."""
valuesX = [];
valuesY = [];
results = DTH.objects.filter(date__gte = '2019-12-01', date__lte = '2019-12-31');
for row in results:
valuesX.append(row.date);
valuesY.append(row.price);
#fig = go.Figure([go.Scatter(x=[0,1,2,3], y=[0,1,2,3])]);
fig = go.Figure([go.Scatter(x=valuesX, y=valuesY)]);
plt_div = plot(fig, output_type='div', show_link=False, link_text="")
return render_to_response('app/index.html', { 'plt_div': plt_div })
Would appreciate your help.