chartjs 3.4.1 configuration

by paul724

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Chart.js</title>
    <link rel="stylesheet" href="main.css">
    <style>
		.wrapper {
		   max-width: 400px;
		   margin: 0 auto;
		}
    </style>
</head>
<body>
 <div class="wrapper">
  <canvas id="myChart"></canvas>
 </div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.4.1/chart.min.js"></script>
<script src="script.js"></script>
</body>
</html>

JavaScript

const labels = ["Decisions", "Flexibility", "Communication", "Learning", "Team", "Awareness", "Agility", "Delegation", "Listening", "Style", "Generation", "Trust"];
const series = [5,4.2,5,3.8,5,4.3,5,4.9,5,3.7,5,4.4];

new Chart(document.getElementsByTagName("canvas")[0], {
  type: "radar",
  data: {
    labels,
    datasets: [{
      backgroundColor: '#0000FF33',
      label: "Leadership Qualities",
      data: series,
      lineTension: 0.1,
    }],
  },
  
  options: {
  	plugins: {
            title: {
                display: true,
                text: 'Leadership',
            },
        },
   scales: { 
   r: {
    pointLabels: {
		family: 'times',
		color: 'green',
		font: {
        size: 12,
        style: 'italic',
      },
    },
  
    angleLines: {
                display: true,
                lineWidth: 1,
				color: 'teal',
				borderDash: ([5, 15]),
				},
			},
		},
    
    scale: {
			display: true,
			min: 0,
			max: 5,
			stepSize: 0.5,

			ticks: {
					showLabelBackdrop: true,
					color: 'green',
				  },
		responsive: true,
  	},
  },
});