Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value.
import React, { useState } from 'react';
import { Chart } from 'primereact/chart';
const PolarAreaChartDemo = () => {
const [chartData] = useState({
datasets: [{
data: [
11,
16,
7,
3,
14
],
backgroundColor: [
"#42A5F5",
"#66BB6A",
"#FFA726",
"#26C6DA",
"#7E57C2"
],
label: 'My dataset'
}],
labels: [
"Red",
"Green",
"Yellow",
"Grey",
"Blue"
]
});
const [lightOptions] = useState({
plugins: {
legend: {
labels: {
color: '#495057'
}
}
},
scales: {
r: {
grid: {
color: '#ebedef'
}
}
}
});
return (
<div className="card flex justify-content-center">
<Chart type="polarArea" data={chartData} options={lightOptions} style={{ position: 'relative', width: '40%' }} />
</div>
);
}
Built-in component themes created by the PrimeReact Theme Designer.
Premium themes are only available exclusively for PrimeReact Theme Designer subscribers and therefore not included in PrimeReact core.
Beautifully crafted premium create-react-app application templates by the PrimeTek design team.