title: Script error : "Uncaught SyntaxError: Unexpected identifier"
body: <p>I know this question has been asked several times, I tried to find a solution but I found nothing. I am trying to create a graph chart.js.</p>
  
  <p>the part that contains the error is that of '<strong>option:</strong>', because when I delete it all works well, but despite that I check well, I do not find the error</p>
  
  <p>here is my error:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected identifier
  </code></pre>
  
  <p>here is my script:</p>
  
  <pre><code>&lt;script&gt;
  
  var timeFormat = 'MM/DD/YYYY HH:mm:ss';
  function newDateLabel(dateObject) {
      val_date = moment(dateObject).format(timeFormat);
      return new Date(val_date)
  }
  
  var config = {
      // The type of chart we want to create
      type: 'line',
  
      data: {
          labels: [
              %for time in list_date:
                  newDateLabel('{{time}}'),
              %end
          ],
  
          datasets: [{
              label: 'Demo',
  
              fill: false,
  
              data: [
                  %for val in list_valeurs:
                      {{val}},
                  %end
              ],
  
              borderWidth: 1
          }]
      },
  
      options: {
          title: {
              text: 'Chart.js Time Scale'
          },
  
          scales: {
  
              xAxes: [{
                  type: 'time',
                  time: {
                      format: timeFormat,
                      tooltipFormat: 'll HH:mm'
                  },
                  scaleLabel: {
                      display: true,
                      labelString: 'Date'
                  }
              }],
  
              yAxes: [{
                  scaleLabel: {
                      display: true,
                      labelString: 'value'
                  }
              }]
  
          },
      }
  
  };
  
  window.onload = function() {
      var ctx = document.getElementById('canvas').getContext('2d');
      window.myLine = new Chart(ctx,config);
  
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>could you help me please ?</p>