Home>

I want to display the graph multiple times with each do using the Vue.js library chart.js (graph), but it is displayed only the first time.
HereI have the same trouble as, but it didn't work even if I referred to it.
Please teach me

<script src = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.js"></script>
<% @ avgs.each do | avg |%>
abridgement
<canvas></canvas>
<script>
  var ctx = document.getElementsByClassName ("RaderChart");
  var RaderChart = new Chart (ctx, {
    type:'radar',
    data: {
      labels: ["Attack Power", "Defensive Power", "Pitcher Power", "Comprehensive Power", "Expectation"],
      datasets: [{
        label:'Strength',
        data: thinking
        backgroundColor:'RGBA (225,95,150, 0.5)',
        borderColor:'RGBA (225,95,150, 1)',
        borderWidth: 1,
        pointBackgroundColor:'RGB (46,106,177)'
      }]
    },
    options: {
      title: {
        display: true,
      },
      layout: {
        padding: {
          left: 550,
        }
      },
      scale: {
        ticks: {
          suggestedMin: 0,
          suggestedMax: 5,
          stepSize: 1,
          callback: function (value, index, values) {
            return value
          }
        }
      }
    }
  });
</script>