Skip to content

Remove Aa in legends with text? #2967

Closed

Description

@chriddyp

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?

Activity

  1. alexcjohnson commented on Sep 3, 2018

    @alexcjohnson
    Collaborator

    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.

  2. eunaka commented on Feb 13, 2019

    @eunaka

    I solved adding to the global style:

    g.pointtext {
    display: none;
    }

  3. etpinard commented on Apr 5, 2019

    @etpinard
    Contributor

    Now in #2967

    Now in #3735

  4. pdfabbro commented on Jul 23, 2019

    @pdfabbro

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

  5. z7ye commented on Oct 8, 2019

    @z7ye

    is this issue ever fixed please?

  6. pdfabbro commented on Oct 9, 2019

    @pdfabbro

    Nope.

  7. nicolaskruchten commented on May 26, 2021

    @nicolaskruchten
    Contributor

    Please note that in the upcoming v2 of the library, this Aa text will no longer appear in the legend: #5682

  8. jaimeMontea commented on May 31, 2021

    @jaimeMontea

    Please note that in the upcoming v2 of the library, this Aa text will no longer appear in the legend: #5682

    I'm interested. Do you know when it is going to be released? Thanks.

  9. nicolaskruchten commented on May 31, 2021

    @nicolaskruchten
    Contributor

    Working on the release now, should be a week or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions