Skip to content

Don't display legend extra values when the x scale is ordinal #766

@markov00

Description

@markov00

Describe the bug
The current extra value displayed on the legend renders by default the last value on the series. This feature is only interesting and useful when rendering charts with a continuous scale along the x. In a categorical scale, the last value doesn't have any special meaning.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/ecstatic-colden-bgzgj?file=/src/App.tsx
  2. The legend is showing the value related to YOW column

Expected behaviour
For ordinal scales along the x axis, the legend extra value should be not displayed until it can be customized to display something else than the last value of the series

Screenshots

Screenshot 2020-07-28 at 13 03 11

Version (please complete the following information):

  • Elastic Charts: all

Metadata

Metadata

Assignees

Labels

:legendLegend related issue:xyBar/Line/Area chart relatedbugSomething isn't workingreleasedIssue released publicly

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