Plotly.js: Remove `Aa` in legends with text?

Created on 3 Sep 2018  路  6Comments  路  Source: plotly/plotly.js

I've worked on a few client projects with Dash where the client asked that the Aa in the legend be removed. To do so, I had to create a set of new traces on top of the existing traces without the text key, and then remove the legend item from the original traces, i.e.:

[
    {x: [1, 2, 3], y: [3, 1, 2], text: ['a', 'b', 'c'], 'showlegend': false, 'legendgroup': 'trace-1', marker: {color: 'blue'}},
    {x: [1], y: [3], 'showlegend': true, 'legendgroup': 'trace-1', marker: {color: 'blue'}},
]

And in the community, some users don't understand why or how the Aa appears (https://community.plot.ly/t/dash-legend-label-extrange-behavoiur-scatterplot/13255).

  • Could we just remove it by default? I feel like the number of folks that want it removed outweighs the number of folks that see the benefit of having it, although I only have anecdotal evidence.
  • If not, could we make a new key to remove it?
feature

Most helpful comment

Why would anybody ever want "Aa" to show up in the legend?? Having it blank or configurable should be the default behaviour.

All 6 comments

I feel like the number of folks that want it removed outweighs the number of folks that see the benefit of having it, although I only have anecdotal evidence.

It's hard to tell, given the selection bias (we'll only ever hear from the people who don't like it).

If not, could we make a new key to remove it?

Definitely. I wonder if we can do something generic like legendstyle: {mode: 'lines+markers'} so you could modify any of the relevant style attributes? Related: #1701 - though I'm not sure if that would quite fit into legendstyle, as the label doesn't exist on the plot itself.

I solved adding to the global style:

g.pointtext {
display: none;
}

Now in https://github.com/plotly/plotly.js/issues/2967

Now in https://github.com/plotly/plotly.js/issues/3735

Why would anybody ever want "Aa" to show up in the legend?? Having it blank or configurable should be the default behaviour.

is this issue ever fixed please?

Nope.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tim-sauchuk picture tim-sauchuk  路  3Comments

mithi picture mithi  路  3Comments

deecay picture deecay  路  3Comments

maxwell8888 picture maxwell8888  路  3Comments

jonmmease picture jonmmease  路  3Comments