import {
RadarChartData,
RadarChart,
useWidth,
} from 'cl-react-graph;
const data: RadarChartData[] = [{
axes: [
{ axis: "strength", value: 13 },
{ axis: "intelligence", value: 6 },
{ axis: "charisma", value: 5 },
{ axis: "dexterity", value: 9 },
{ axis: "luck", value: 2 }
]
},
{
axes: [
{ axis: "strength", value: 6 },
{ axis: "intelligence", value: 7 },
{ axis: "charisma", value: 10 },
{ axis: "dexterity", value: 13 },
{ axis: "luck", value: 9 }
]
}];
const MyComponent = () => {
const [ref, width] = useWidth('90%');
return(
<div ref={ref}>
<RadarChart
id="radar-demo"
height={400}
width={width}
data={data} />
</div>
)
};