Skip to content

Negative areas doesn't respect the zero baseline #893

@markov00

Description

@markov00

Describe the bug
When rendering data with all negative values, the area chart doesn't respect the zero baseline and always render the chart with a baseline as the min domain value.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/gracious-ride-9f6wn?file=/src/App.tsx
  2. the area covers the from the min domain to the max domain, and doesn't consider 0 as baseline

Expected behaviour
For area and bar, if not configured otherwise(currently not possible), the baseline should be always zero.

Screenshots
Screenshot 2020-11-06 at 10 30 32

Version (please complete the following information):

  • Elastic Charts: 24

Additional context
n/a

Errors in browser console
n/a

Metadata

Metadata

Assignees

Labels

:dataData/series/scales related issue:xyBar/Line/Area chart relatedbugSomething isn't workingregressionreleasedIssue 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