I was following an example on how to update points in a scatter plot with click events https://plotly.com/python/click-events/.
The callback function in the example updates the color and size of markers upon click. (see my question after the code extract)
# create our callback function
def update_point(trace, points, selector):
id=trace.ids[points.point_inds[0]]
c = list(scatter.marker.color)
s = list(scatter.marker.size)
for i in points.point_inds:
#change only this one
c[i] = '#bae2be'
s[i] = 20
with f.batch_update():
scatter.marker.color = c
scatter.marker.size = s
My question is: How do you, on the same click, update the marker text (in this case the text parameter of the Scatter-object)?
Thanks
Michael