Upsidedown LabelSet

Hi,

to display some text inside my pie chart I use LabelSet

df['textdisplayed'] = df['permanentdisplay'].astype(str)
.str.pad(40, side = "left")
labels = LabelSet(x=0, y=0,text='textdisplayed',
angle=cumsum('angle', include_zero=True),
text_font_size="10pt",source=srcfiltered)

(I use pad to shift the text to edge of the circle)

Now, I would like to rotate the text by 180° when the angle is between [90°, 270°] to be able to read it. How can I proceed ?
By advance thank you.
Olivier

1 Like

I think you will have to something like rotate the opposite direction and use a top (hanging) baseline for the labels you want “flipped”.

1 Like

thanks.
After struggling a while I found a solution here

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.