Chart JS Identifier 'date1' has already been declared

Hello, I’m a beginner and I’m currently learning Symfony. I’m implementing graphs and I get this error: Identifier ‘date1’ has already been declared, but I don’t understand why.

const date1 = {{mesureDate1|raw}};
    const datapoints1 = {{mesureVal1|raw}};
    const chartData1 = {
      labels: date1,
      datasets: [{
        label: '',
        data: datapoints1,
        borderWidth: 1

    const chartConfig1 = {
      type: 'line',
      data: chartData1,
      options: {
        scales: {
          x: {
            type: 'time',
            time: {
              unit: 'day',
          y: {
            beginAtZero: true

    const myChart1 = new Chart(

if it has already been declared you can’t use it again. It’s how const works, you need to choose a different variable name