-
Notifications
You must be signed in to change notification settings - Fork 18
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
Definable color palette #15
Comments
I was able to correct the PieDonut() function in order to make it possible to define the color palette: Then, I went straight to simplifying how colors are handled for both the pie and donut sections. I've added the customColors parameter to directly set up the mainCol. This way, I'm applying the exact same custom color mapping to both parts of the chart, ensuring they're in sync, color-wise. Finally, I tweaked the geom_arc_bar calls. I replaced the fill parameter from "no" – which was a bit of a placeholder and didn't do much – to actually use the grouping variable, which in my case is pies. This move made sure the colors I specified in customColors are now correctly showing up on both the pie and donut parts. Before this change, the donut part was showing up all gray because it wasn't getting the right instructions on what colors to display. Now, it's looking exactly how I wanted. So you'll have to create a color mapping according to your grouping factor and then assign to customColors function parameter this mapping object. |
I've produce a pull request according to what written above. #22 |
It would be amazing if one could define the color palette for the plots. Any chance you will implement this in a new version?
Thanks a lot!
The text was updated successfully, but these errors were encountered: