The tooltip appears in the incorrect position after sorting the table. I ran a quick test using a snippet from DataTable Tooltips | Dash for Python Documentation | Plotly, and just added sort_action="native". How can this be resolved? Or any suggestions/workarounds?
from dash import Dash, dash_table
app = Dash(__name__)
app.layout = dash_table.DataTable(
data=[
{'shop': 'Bakersfield', 'sales': 4, 'goal': 10},
{'shop': 'Berkeley', 'sales': 10, 'goal': 1},
{'shop': 'Big Bear Lake', 'sales': 5, 'goal': 4}
],
columns=[
{'id': 'shop', 'name': 'Store Location'},
{'id': 'sales', 'name': 'Sales Revenue'},
{'id': 'goal', 'name': 'Revenue Goal'},
],
tooltip_data=[
{
'shop': 'Location at Bakersfield',
'sales': '$4M in Revenue',
'goal': {'value': '6M **under** Goal', 'type': 'markdown'}
},
{
'shop': 'Location at Berkeley',
'sales': '$10M in Revenue',
'goal': {'value': '9M **over** Goal', 'type': 'markdown'}
},
{
'shop': 'Location at Big Bear Lake',
'sales': '$5M in Revenue',
'goal': {'value': '1M **over** Goal', 'type': 'markdown'}
},
],
tooltip_delay=0,
tooltip_duration=None,
sort_action="native",
)
if __name__ == '__main__':
app.run_server(debug=True)
1 post - 1 participant