fix click on point

This commit is contained in:
2025-08-12 15:50:42 -07:00
parent 69a77d18b9
commit 89df126b1e

10
app.py
View File

@@ -259,7 +259,15 @@ def display_click_data(clickData, data):
if not clickData or not data:
return "Click on a point to see details"
point_index = clickData['points'][0]['pointIndex']
# Get point index - try different possible keys
point_data = clickData['points'][0]
if 'pointIndex' in point_data:
point_index = point_data['pointIndex']
elif 'pointNumber' in point_data:
point_index = point_data['pointNumber']
else:
return "Could not identify clicked point"
doc = data['documents'][point_index]
return dbc.Card([