Skip to content
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

Title: How to add labels to a donut chart created with tidyplot? #21

Open
Liu499-create opened this issue Dec 9, 2024 · 2 comments
Open
Labels
feature a feature request or enhancement

Comments

@Liu499-create
Copy link

Description: I am using the tidyplot package to create a donut chart with the following code:
energy %>%
tidyplot(y = power, color = energy_type) %>%
add_donut()
I would like to add labels to each sector of the donut chart (for example, percentage or values). Is there a way to add labels in the chart generated by add_donut()? Do I need to use any additional functions or parameters to achieve this?

Thank you!

@jbengler
Copy link
Owner

jbengler commented Dec 9, 2024

Hi @Liu499-create

Thank you for using tidyplots!

Unfortunately, what you want to do is not yet possible in tidyplots. Moreover, the implementation is quite complicated, so I can only point you to a website how to do this in ggplot2:

https://r-charts.com/part-whole/donut-chart-ggplot2/

I will leave this issue open. Maybe someday in the future I will find the time to think about an implementation.

Best
Jan

@jbengler jbengler added the feature a feature request or enhancement label Dec 9, 2024
@Liu499-create
Copy link
Author

Hi @Liu499-create

Thank you for using tidyplots!

Unfortunately, what you want to do is not yet possible in tidyplots. Moreover, the implementation is quite complicated, so I can only point you to a website how to do this in ggplot2:

https://r-charts.com/part-whole/donut-chart-ggplot2/

I will leave this issue open. Maybe someday in the future I will find the time to think about an implementation.

Best Jan

Thank you very much for developing the Tidyplots package, and I also appreciate the alternative approaches you provided! Wishing you continued success and improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants