Wins: 32%
?Wins: 32
.var ctx = document.getElementById('myChart').getContext('2d');
const total = parseInt($('#t-games').html());
const wins = parseInt($('#wins').html());
const los = parseInt($('#los').html());
var myChart = new Chart(ctx, {
options: {
scales: {
xAxes: [{
gridLines: {
display: false
},
ticks: {
display: false
}
}],
yAxes: [{
gridLines: {
display: false
},
ticks: {
display: false
}
}]
},
},
type: 'doughnut',
data: {
labels: ['Wins', 'Loses '],
datasets: [{
data: [wins,los],
backgroundColor: [
'rgba(31, 210, 31, 0.86)',
'rgba(225, 39, 39, 0.86)'
],
borderColor: [
'rgba(31, 210, 31, 0.86)',
'rgba(225, 39, 39, 0.86)'
],
borderWidth: 1
}]
}
});