YouTip LogoYouTip

Chartjs Polararea

# Chart.js Polar Area Polar area charts are similar to pie charts, but each dataset has the same angle, and the radius of the segments varies based on the provided values. Mixed chart **type** property is polarArea. const config = { type: 'polarArea', data: data, options: {}}; Next, let's create a simple polar area chart: ## Example const ctx = document.getElementById('myChart'); const data ={ labels:[ 'Red', 'Green', 'Yellow', 'Grey', 'Blue' ], datasets:[{ label:'Polar Area Example', data:[11,16,7,3,14], backgroundColor:[ 'rgb(255, 99, 132)', 'rgb(75, 192, 192)', 'rgb(255, 205, 86)', 'rgb(201, 203, 207)', 'rgb(54, 162, 235)' ] }] }; const config ={ type:'polarArea', data: data, options:{ responsive:true,// Set chart as responsive, changes with screen window maintainAspectRatio:false,// Maintain chart's original aspect ratio } }; const myChart =new Chart(ctx, config); [Try it Β»](#) The above example outputs:
← Chartjs Scatter2Chartjs Line β†’