-
Hi there, I am playing with this example using arc as mark. While the code works well as it is, however, if I assign radius to another column in the data frame, the plot looks completely wrong. Here is an example: source = pd.DataFrame({"values": [12, 23, 47, 6, 52, 19]})
source["radius"] = source.values # <-- Create a new column for radius.
base = alt.Chart(source).encode(
alt.Theta("values:Q").stack(True),
alt.Radius("radius:Q").scale(type="sqrt", zero=True, rangeMin=20),
color="values:N",
)
base.mark_arc(innerRadius=20, stroke="#fff") I am using the latest atlair version 5.1.1. Any clues on why it is the case? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hmm, not sure what happens there, but it is related to how Vega-Lite renders the chart. It works if you set both columns to |
Beta Was this translation helpful? Give feedback.
Thanks! It seems this bug has been reported back Feb 2022 but has not been fixed in Vega-Lite. This bug unfortunately makes altair/vega-lite incapable of creating radial chart.