Skip to content
Advertisement

Bokeh pie chart show percentage labels upside down

I have a dataframe with amounts grouped by categories and I want to generate a pie chart containing the percentages per category. I am using the Bokeh library in Python.

My problem is that some percetange labels are not displayed properly in the pie chart as shown in the following image. enter image description here

Here is the code that I use to produce the pie chart:

JavaScript

Some data to reproduce the the pie chart above (tab separated)

JavaScript

Any ideas how to solve this?

Thank you in advance!

Advertisement

Answer

I have found two useful StackOverflow posts to solve this:

Therefore, I have modified your code as follows:

JavaScript

The produced pie chart is:

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement