How to get changes to legend?

#1

I have an event handler, ‘plotly_relayout’, for changes to the chart title or axis labels but I can’t find any info about event handlers for changes to the legend text. So, how can I capture changes to the legend?

#2

Its the same event handler plotly_relayout. Check for the graphDiv.data.name for updated legend