graphique arraignée ou encore radar chart

code pour le le petit peuple faire un graphique arraignée ou encore radar chart

<canvas id="agenceTrois" ></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
    var ctx = document.getElementById('agenceTrois').getContext('2d');

    var myRadarChart = new Chart(ctx, {
        type: 'radar',
        data: {
            labels: ['Paramètre 1', 'Paramètre 2', 'Paramètre 3', 'Paramètre 4', 'Paramètre 5'],
            datasets: [{
                data: [5, 5, 5, 4.2, 5],
                backgroundColor: 'rgba(252, 118, 41, 0.2)',
                borderColor: 'rgb(252, 118, 41)',
                borderWidth: 3,
                label: '' // Laissez le libellé vide pour supprimer la légende
            }]
        },
        options: {
            responsive: true,
            maintainAspectRatio: false,
            scales: {
                r: {
                    suggestedMin: 0,
                    suggestedMax: 5,
                    stepSize: 1,
                    pointLabels: {
                        font: {
                            size: 12 // Ajustez la taille de la police d'écriture des étiquettes ici
                        }
                    }
                }
            },
            plugins: {
                legend: {
                    display: false // Cela supprime la légende
                }
            }
        }
    });

</script>

Publications similaires