Kibana version:
8.0.0
Elasticsearch version:
8.0.0
Server OS version:
Browser version:
Chrome Version 80.0.3987.122
Original install method (e.g. download page, yum, from source, etc.):
Local
Describe the bug:
Legend toggle in vislib charts not functioning correctly.
Steps to reproduce:
vislib visualization with or without a legend.Expected behavior:
Toggle button toggles on and off the chart legend.
Screenshots:

Pinging @elastic/kibana-app (Team:KibanaApp)
git bisect shows this commit created the issue.
[29e984a61c7036293ab2b0ef7da40e2e262ac9fb] [Step 2] ui/persisted_state 馃憠 src/plugins/visualizations (#58501)
@alexwizp would you have time to look into this issue?