title: Customise looks plotly.js legends
body: <p>I have created an independent y-ax for every trace created. Sometimes there are to many traces/y axis.</p>
  
  <p>I would like to have the legend buttons inside of an option list with same native functionality: click-toggles trace visibility. Ideally when hiding a trace by clicking its legend , its y-axis(tick values) would also be hidden. </p>
  
  <p>Also it be nice that if all traces/y-axis are displayed -> set max width to the container holding the y-axis in order for the plot/graph area/domain to always take at least 70% of width (setting an overflow:scroll to the y-axis container) </p>
  
  <p><a href="https://i.stack.imgur.com/2nrqy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2nrqy.png" alt="enter image description here"></a></p>
  
  <p>I have gone through the docs but not fount what I need..</p>
  
  <pre><code>layout.showlegend = true/false -&gt; hides/shows all the legend box
  trace1.showlegend = true/false -&gt; hides/shows one legend(for trace1) in the box
  </code></pre>
  
  <p>if i do:</p>
  
  <pre><code>trace1.visible= false -&gt; I hide both the trace and legend for it
  trace1.opacity= 0 -&gt;hides the trace not the legend for it but alters the legend icon(if line+dot -&gt; only line)
  </code></pre>
  
  <p>Which attribute is changed natively when toggeling the legend links in order to hide the trace but keep the legend button for it intact?</p>
  
  <p>Need to know to implement the functionality through a multi select dropdown</p>