Showing Images in tooltip

Hey there,

i saw this cool component and was wondering if i could show tooltips inside a aggrid.
Right now im reading the Documentation and can’t get any further / dont understand it.
I want to display an image whenever I hover over one of the “name” coloums.

Now I’m missing how to feed the tooltip data to aggrid and display them.

Here is what i got so far:

d = {'col1': [1, 12, 13], 'col2': [2, 22,23]}
df = pd.DataFrame(d)
df.columns = ["Number","Name"]
df= df.sort_values("Number", ascending=True, key=natsort.natsort_keygen(),ignore_index=True)

grid_options = {
    "columnDefs":[
        {
            "headerName": "Number",
            "field": "Number",
            
        },
        {
            "headerName": "Name",
            "field": "Name",
            "tooltipField": 'Name',
        },   
    ],
}
builder = GridOptionsBuilder.from_dataframe(df)
builder.configure_column("second_column", header_name="Name", tooltipComponent="CustomTooltip")
go = builder.build()

AgGrid(df,grid_options=go)

Thanks for your time!

1 Like

@Keldor how to control AgGrid under a container