patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
796 stars 356 forks source link

Bug - chart legend tooltip - missing space between label and value #11154

Closed dlabrecq closed 1 week ago

dlabrecq commented 2 weeks ago

When we have only one item in the chart (or items of the same length), there is no space between the label and value.

See Cost Management issue https://issues.redhat.com/browse/COST-5648

The underlying issue is that "Cats" and "Dogs" may be the same number of characters, but they are not always the same length within a font family.

This is reproducible below when hiding all but one data set (i.e., only "Birds" is visible). https://www.patternfly.org/charts/legends#interactive-legend

Example 1 Image

As a second test, change the data series legendItem; "Cats" to "us-west-1" and "Dogs" to "us-west-2"

Example 2 Image