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>
-
Answer # 1
Related articles
- javascript - even if i add a li tag multiple times, only the last li tag is added
- javascript - how to add multiple hh: mm: ss format times using momentjs
- i want to run javascript only the first time
- javascript - i want to send a token with vue
- javascript - i want to make roulette with html and css
- javascript - i want to install multiple displays that display 3 each when clicked in see more
- javascript - how to use multiple select box refinements using the chosenjs library
- javascript - i want to make multiple kitchen timers on one screen
- javascript - i want to do ban with discord js
- javascript - i want to like async with ajax
- how to use queryselector with javascript
- i want to raise the same event for multiple elements with javascript, but the event does not occur (modal window example)
- i want to run cron at random times
- javascript - how to use arrays in multiple classes with react native
- javascript - [slick] i want to control multiple slides with one dot
- javascript - save values in multiple tables using form object
- javascript i want to get multiple return values
- javascript - i want to implement scroll with slow and fast!
- i want to run php with postfix
Trends
- python - you may need to restart the kernel to use updated packages error
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to check the type of a shell script variable
- i want to call a child component method from a parent in vuejs
It was just a typo
I could do it by referring to the link in the question text
Excuse me