title: Chart.js not updating or receiving data from Flask python
body: <p>I am trying to create an interactive chart for a web app with data from python script.</p>
  
  <p>The error is data from the python code is not transferred or updated on the chart.js script and not output on the html.</p>
  
  <p>The flow of the 3 scripts: labels and data from python, goes into the chart.js to render the bar-chart and is output on the html </p>
  
  <p>When I change Africa (data point) from 2447 to 5578, the chart is not updated. I am not sure if the issue is transferring from python or rendering the chart.</p>
  
  <p>Python </p>
  
  <pre><code>from flask import Flask,render_template
  app = Flask(__name__)
  
  @app.route("/")
  def result():
     labels = ["Africa", "Asia", "Europe", "Latin America", "North America"]
  
     data = [5578,5267,734,784,433]
  
     return render_template("result.html", labels=labels, data=data)
  if __name__ == '__main__':
  app.debug = True
  app.run()
  </code></pre>
  
  <p>script1.js </p>
  
  <pre><code>new Chart(document.getElementById("bar-chart"), {
  type: 'bar',
  data: {
    labels: "{{labels}}",
    datasets: [
      {
        label: "Population (millions)",
        backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9","#c45850"],
        data: "{{data }}"
      }
    ]
  },
  options: {
    legend: { display: false },
    title: {
      display: true,
      text: 'Predicted world population (millions) in 2050'
    }
  }
  });
  </code></pre>
  
  <p>HTML </p>
  
  <pre><code>  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;New&lt;/title&gt;
     &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.min.js"&gt; 
  &lt;/script&gt;
  
    &lt;/head&gt;
    &lt;body&gt;
    &lt;h1&gt;Test&lt;/h1&gt;
      &lt;div class="wrapper"&gt;
      &lt;canvas id="bar-chart" width="800" height="450"&gt;&lt;/canvas&gt;
      &lt;/div&gt;
  
       &lt;script src="{{ url_for('static', filename='script1.js') }}"&gt;&lt;/script&gt;
  
     &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>