title: Plotly scatter isn't displayed by Flask
body: <p>I have a plotly scatter, but it's not displayed by flask
  I took it from examples from internet</p>
  
  <p>Result of my work looks like <a href="https://i.stack.imgur.com/anTCU.png" rel="nofollow noreferrer">that</a>:</p>
  
  <p>And here is my code:</p>
  
  <p><strong>plotly_test.py</strong></p>
  
  <pre class="lang-py prettyprint-override"><code>from flask import Flask, render_template
  import json
  import plotly
  from plotly import graph_objs as go
  import numpy as np
  
  app = Flask(__name__)
  
  @app.route('/', methods=['GET', 'POST'])
  def kek():
      t = np.linspace(0, 10, 100)
      fig = go.Figure()
      fig.add_trace(go.Scatter(
          x=t, y=np.sin(t),
          name='sin',
          mode='markers',
          marker_color='rgba(152, 0, 0, .8)'
      ))
      fig.add_trace(go.Scatter(
          x=t, y=np.cos(t),
          name='cos',
          marker_color='rgba(255, 182, 193, .9)'
      ))
      fig.update_traces(mode='markers', marker_line_width=2, marker_size=10)
      fig.update_layout(title='Styled Scatter',
                        yaxis_zeroline=False, xaxis_zeroline=False)
      data = [fig]
      graphJSON = json.dumps(data, cls=plotly.utils.PlotlyJSONEncoder)
      return render_template('test1.html', graphJSON=graphJSON)
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>And my html with styles and script:</p>
  
  <p><strong>test1.html</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;style type="text/css"&gt;
              .header{
                  text-align: center;
                  background-color: rgb(136, 185, 229);
                  height: 70px;
                  line-height: 70px;
              }
              .chart{
                  margin-top: 30px;
                  text-align: center;
              }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="header"&gt;
              &lt;h2&gt;
                  Plotly Chart Demo
              &lt;/h2&gt;
          &lt;/div&gt;
          &lt;div id="chart" class="chart"&gt;
          &lt;/div&gt;
      &lt;/body&gt;
          &lt;!-- D3.js --&gt;
          &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"&gt;&lt;/script&gt;
          &lt;script src="https://code.jquery.com/jquery-2.1.4.min.js"&gt;&lt;/script&gt;
          &lt;!-- Plotly.js --&gt;
          &lt;script src="https://d14fo0winaifog.cloudfront.net/plotly-basic.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
              var graphs = {{ graphJSON|safe }};
              Plotly.plot('chart', graphs, {});        
          &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Can you explain me what do I do wrong?
  Scatter works good without flask, but it doesn't with it!</p>
  
  <p><a href="https://i.stack.imgur.com/pyZ6L.png" rel="nofollow noreferrer"><strong>js concole</strong></a></p>