I am using PieChart from recharts. I want to display my data as a percentile. I try to convert the data sting but then the data start doesn't work. How can I do it?
const data01 = [
{ name: "Dönen Varlıklar", value: asset_1 },
{ name: "Duran Varlıklar", value: asset_3 },
];
var asset_1 = (assets.titles[0].values[0].value)*100
var asset_3 = (assets.titles[1].values[0].value)*100
...
<PieChart width={500} height={300}>
<Pie
data={data01}
cx={250}
cy={130}
innerRadius={60}
outerRadius={80}
fill="#8884d8"
paddingAngle={5}
cornerRadius={20}
dataKey="value"
>
data01.map((entry, index) => (
<Cell key={`cell-${index}`} fill={COLORS[index % COLORS.length]} />
</Pie>
<Legend/>
<Tooltip />