✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

Bringing a trace to the front using plotlyProxyInvoke

Is it possible to use the restyle method of plotlyProxyInvoke to bring a trace to the front? I am developing a Shiny app that displays a line chart with multiple traces and would like to bring a single trace to the front (i.e. on top of all other traces) as selected by the user without re-rendering the whole plot.

I discovered that plotlyProxyInvoke has a moveTraces method that does exactly this!