I tried creating the chart however it ends up showing two charts side-by-side. How do I get a single chart instead like the one shown in altair grouped bar chart example.
df = pd.DataFrame({
'strike': [200,225,250,275,300,325,350,200,225,250,275,300,325,350],
'opttype': ['ce','ce','ce','ce','ce','ce','ce','pe','pe','pe','pe','pe','pe','pe' ],
'oi': [100,150,500,800,450,200,77,50,500,210,300,150,60,17]
})
c = alt.Chart(df).mark_bar().encode(
x='strike:N',
y='oi:Q',
color='opttype:N',
column='opttype:N'
)
I tried adding axis as specified in this link, however I could not get the combined graph. May be I am missing something here.
Also I wonder how the official documentation example works correcly without the "axis" as well.