Skip to content

Only first trace toggled when horizontal legend and legendPosition: true #2819

Closed
@AlanJMac

Description

@AlanJMac

When the legend layout is set to the horizontal orientation and the legendPosition config variable is set to true then clicking the trace names in the legend will only toggle the visibility of the first trace.
The behaviour is as expected when the legend is vertically orientated or if its position is not editable.

The layout and config to reproduce this with 2 or more traces is as follows:

var layout = {
  legend: {
    orientation: 'h'
  }
};

var config = {
  edits: {
    legendPosition: true
  }
};

This can be seen in the following codepen: https://codepen.io/alanjmac/pen/NBNmaQ

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions