Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

recharts pie chart different colors

<Pie
  data={data} 
  cx={120} 
  cy={200} 
  innerRadius={60}
  outerRadius={80} 
  fill="#8884d8"
  paddingAngle={5}
>
  {
    data.map((entry, index) => <Cell fill={COLORS[index % COLORS.length]}/>)
  }
</Pie>
Source by github.com #
 
PREVIOUS NEXT
Tagged: #recharts #pie #chart #colors
ADD COMMENT
Topic
Name
2+8 =