How to automatically hide trace legend?


#1

I have 3 traces, one of them has x and y values has zero (x:[0],y:[0]), this trace is not shown in the chart but it legend shows dark black.

If a trace has zero as values, I need to automatically isolate the legend, (show light black this legend)…


#2

Like this https://plot.ly/javascript/reference/#scatter-showlegend ?


#3

This is how my chart looks right now.

And, I need it to look like this automatically when the charts is display.

Is this functionality available for plotly?


#4

that’s showlegend: 'legendonly'


#5

Nop, it didn´t work.


#6

Ok, would you mind sharing a code snippet of what you’ve tried to help me help you?


#7

this is my example,

I had 4 traces, the number 3 has values X and Y zero… as you can see trace3 has a point it on coordinates 0,0, its empty so i want to make that plotly shows this trace automatically like this:

image

thank you so much for your help and time…