LayTec-AG / Plotly.Blazor

This library packages the well-known charting library plotly.js into a razor component that can be used in a Blazor project.
MIT License
345 stars 48 forks source link

Add legend click event #380

Closed jacekpapiniak closed 9 months ago

jacekpapiniak commented 10 months ago

I was investigating legend click event. Plotly.Blazor was not supporting this event so this PR is introducing it. I tried to find more informations about EventData for plotly_legendclick but this website was all I could find: https://plotly.com/javascript/plotlyjs-events/#legend-click-events

Apart from that I did print out properties that are part of this events data but it looks like it supports curveNumber and expandedIndex plus ref to layout. If you know full list of properties or know that we can return more data from this event let me know and I will add it.

Also I am getting exception regarding code snippet that it fails to get code and it fails with code 404. Url path to snippet is right so is this because of code is not on the repo?