Skip to content Skip to sidebar Skip to footer

Stacked Text In A Stacked Bar Chart Using Altair Mark_text

I'm trying to use mark_text to create a stacked text in a stacked bar chart. I would like to label each bar with the value of 'Time'. Is it possible to have text marks in the corre

Solution 1:

Your bar chart specifies a stack order:

order=alt.Order('color_Category_sort_index:Q'),

You should add a matching order encoding to your text layer to ensure the text appears in the same order.

Post a Comment for "Stacked Text In A Stacked Bar Chart Using Altair Mark_text"