-
Using the single chart example, I have a label for each piece of cake. If I try to transform it in a faceted chart using this code df=pd.read_csv("input.csv",keep_default_na=False)
base=alt.Chart(df).encode(
theta=alt.Theta(field="v", type="quantitative"),
color=alt.Color(field="k", type="nominal")
)
pie = base.mark_arc(outerRadius=100)
text = base.mark_text(radius=115,fill= "black").encode(alt.Text(field="v", type="quantitative", format=",.1f"))
alt.layer(pie, text, data=df).facet(column='label') all the labels are all in the same wedge and then illegible (here the vega lite version vega lite version). How to have a result like that of the single chart? Thank you
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Does adding the following to the very end make it work the way you want?
By default, Vega-Lite and Altair will try to use a shared scale for all three of the pie charts. Here is an example that I tried. (You can also remove the
|
Beta Was this translation helpful? Give feedback.
-
I'm adding here the link to @mattijn to mark this as the right answer: |
Beta Was this translation helpful? Give feedback.
I'm adding here the link to @mattijn to mark this as the right answer:
#2887 (reply in thread)