New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use different color in pie chart ?thank you #470
Comments
Hi, There is a example in the Recharts examples section that demonstrates your requirements, Basically you take each Cell component and fill with your desired color <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> |
thank you very much! |
thanks, man save my day. |
Are you planning to add a builtin color palate array in the future? |
@CaledoniaProject I doubt it. We may add one default color or color array so it's better than black by default, but d3-scale-chromatic works well for this in general outside of recharts. |
Thanks a lot for this! |
The text was updated successfully, but these errors were encountered: