Altair circle example do not work

The circle plot in the official demo can display every point’s value
image

but when I use its’ code, the value can not be displayed, I can’t find why could anyone give me any suggestion?.
image

Hi @kun,

Could you specify a link to the demo you are talking about :slight_smile: ? Maybe there’s a discrepancy between the code and an image ?

To get the tooltip part, I had to specify it in the encoding method :

import numpy as np
import pandas as pd
import altair as alt
import streamlit as st

df = pd.DataFrame(
    np.random.randn(200,3),
    columns=['a', 'b', 'c']
)

c = alt.Chart(df, width=600).mark_circle().encode(
    x='a', y='b', size='c', color='c', 
    tooltip=['a', 'b', 'c'] # <--- tooltip part
)

st.altair_chart(c)

Thanks for your reply, I can not give a link, but I can give the picture show where it is, I think it is a documentation bug.

Yup, that was a good catch, I filed an issue for this.

Thanks @kun !