Skip to content

Do not force stacking on single histogram series #2223

@nickofthyme

Description

@nickofthyme

Describe the issue

Whenever a user creates a bar series and enables the enableHistogramMode flag, the series is treated as stacked.

This unexpectedly disabled the domain fitting due to the filling of dataseries values for stacked series.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/empty-pond-lfn4t2
  2. Toggle enableHistogramMode option
  3. Notice how the domain fit is applied in each case

Expected behaviour
Domain fit should not be impacted by whether the enableHistogramMode flag is enabled or not.

Version (please complete the following information):

  • Elastic Charts: v21.0.0

Additional context

This issues was introduced in #751 by treating any bar series with enableHistogramMode set to true as stacked. This was done to prevent clustered bar charts in a histogram.

The solution here would be to only force the stacking behavior for histogram bar charts when there is more than one bar series.

Kibana Cross Issues

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

Labels

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