Skip to content

Per-group names in groupby transform #1893

Closed
@rreusser

Description

@rreusser

The problem: When you group more than once trace, the legend is confusing. It shows repeated groups without a good indication of which trace they belong to:

screen shot 2017-07-18 at 12 37 49

More buggily, as @chriddyp points out, if you change trace group names in the legend while in edit mode, they revert because there's nowhere in the schema for the input to go. One solution would be to add a names field for custom group names, e.g.:

"type": "groupby",
"target": ["morning", "morning", "evening", "evening"],
"names": [
  {
    "value": "morning",
    "name": "kale - morning"
  },
  {
    "value": "evening",
    "name": "kale - evening"
  }
]

That at least makes room for the input and seems much less corner-case bound than combining the names into a single string automatically.

On a more UX level, it would be possible to show the legend group name (i.e. parent trace name) and group the traces visually, as in:

+- radishes ---+
| o morning    |
| x evening    |
+--------------+

+- carrots ----+
| o morning    |
| x evening    |
+--------------+

+- kale -------+
| o morning    |
| x evening    |
+--------------+

This solution resolves the UX issue but not the nowhere-for-editmode-input-to-go issue.

/cc @chriddyp @alexcjohnson @etpinard @bpostlethwaite @cldougl for thoughts.

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