Skip to content

Long labels overflows the chart when using the inside legend #1686

@markov00

Description

@markov00

Describe the issue
See elastic/kibana#130197

To Reproduce
Steps to reproduce the behavior:

  1. Go to [storybook](https://elastic.github.io/elastic-charts/?path=/story/legend--inside-chart&globals=theme:light&knob-Number of series=5&knob-Series with long name=3&knob-Inside chart_Legend=true&knob-Show legend action_Legend=&knob-floating columns_Legend=2&knob-vAlign_Legend=bottom&knob-hAlign_Legend=right&knob-direction_Legend=vertical&knob-max label lines_Legend=1&knob-long label_Legend=long name long name long name long name long name long name long name long name)
  2. Resize the chart

Expected behaviour
We should truncate the labels to fit within the chart area

Screenshots
image

Kibana Cross Issues

elastic/kibana#130197

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • Every related Kibana issue is listed under Kibana Cross Issues list and the kibana cross issue tag is applied

Metadata

Metadata

Assignees

No one assigned

    Labels

    :legendLegend related issue:xyBar/Line/Area chart relatedImpact:LowbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions