Skip to content

legend items (trace names) in horizontal legends aren't aligned nicely if all in one row #1193

Closed
@salim-b

Description

@salim-b

The problem occurs if legend = list(orientation = "h") (in R) or layout = {legend: {"orientation": "h"}}; (in JS) is set and the frame width is large enough to place all legend items on one line.

The logic to align the legend items in a grid (see also #786) is generally a good thing for responsiveness, but doesn't look good if the resulting grid consists of only one row as in the example below:
example
(note the spacing between SRG SSR, Schweizer Privatsender and Ausländische Sender; here is the same chart hosted on plot.ly)

Some more information I could find:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions