Skip to content

Add annotations to the legend #555

Closed as not planned
Closed as not planned

Description

Is your feature request related to a problem? Please describe.
Actually, the legend shows only the series names. We should also add the ability to include any annotation to the legend with it's own marker/colors/icons

Screenshot 2020-02-18 at 16 25 27

Screenshot 2020-03-27 at 15 33 22

Describe the solution you'd like
We should have a prop in the Annotation component that describe if we want that annotation displayed on the legend or not. (By default, to avoid breaking changes, that option should be off).
The legend should display the name/id of the annotation + one of the following:

  • the marker/icon if the LineAnnotation has a marker configured
  • a small vertical/horizontal line if the LineAnnotation doesn't have a marker configured, the color should be the same of the annotation stroke
  • a small square with the same fill/opacity of the RectAnnotation
  • Annotation groupings should be toggleable the same as chart series in the legend.

The legend item for each annotation should also allow the user to hide/show the group of annotations.

Describe alternatives you've considered
n/a

Additional context
The requests comes from #522

Kibana Cross Issues

Checklist

  • this request is checked against already exist requests
  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    :legendLegend related issueenhancementNew feature or request

    Type

    No type

    Projects

    • Status

      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions