Hi,
I am having trouble with my conditional tooltip and can’t seem to figure it out.
I want to use this tooltip, but only apply it when the cell is overflowing.
(It just shows the value of the cells in the description column.)
By default the tooltip shows for all cells.
style_cell={
'overflow': 'hidden',
'textOverflow': 'ellipsis',
'maxWidth': 300,
},
# tooltip_data=[
# {
# 'Description': {
# 'value': str(row['Description']),
# 'type': 'markdown'
# }
# } for row in df.to_dict('records')
# ],
I tried to use a similar format but it does not work as expected.
The ‘filter_query’ works as I can have the tooltip only display on certain cells.
However the ‘value’ does not work as it only displays ‘nan’.
Additionally I am not sure how to write a filter query to detect overflow cells.
Any help is appreciated.
tooltip_conditional=[
{
'if': {
'filter_query': '{Description} contains "???"'
},
'value': str(row['Description']),
'type': 'markdown',
} for row in df.to_dict('records')
],
Thanks!