The plotly_legendclick event is launched before applying visibility changes to the plots. This is in order to cancel the behavior that the legends have by default by returning the false value. To obtain the visibility of the plots after clicking on a legend you must use the plotly_restyle event and in the data that it returns is the visible property and the index of the graph that was changed.