import React from 'react';
import { PieChart, Pie, Cell, Legend, Tooltip } from 'recharts';
{ name: 'A', value: 400 },
{ name: 'B', value: 300 },
{ name: 'C', value: 200 },
{ name: 'D', value: 100 },
const colors = ['#0088FE', '#00C49F', '#FFBB28', '#FF8042'];
const PieChartComponent = () => {
<PieChart width={400} height={400}>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[index % colors.length]} />
<Legend verticalAlign="bottom" height={36} />
export default PieChartComponent;