Skip to content

Error using allowBrushingLastHistogramBin on last bar only #2224

@nickofthyme

Description

@nickofthyme

Describe the issue

If you have a histogram bars chart with allowBrushingLastHistogramBin disabled, when you go to brush the last bucket it gives you bad start value.

To Reproduce
Steps to reproduce the behavior:

  1. Go to story
  2. Disable the allowBrushingLastHistogramBin
  3. Brush the last bar such that the start and end of the brush is on the last bar
  4. Notice the starting value is greater than the end as the end is rounded to the max value.

Screen Recording 2023-11-01 at 10 38 46 AM

Expected behaviour
It should round both the start and end brush coordinates to the last bucket value. In the example above this would be [5, 5].

Version (please complete the following information):

  • Elastic Charts: latest

Additional context
This is likely a rare use case as the allowBrushingLastHistogramBin option defaults to true

Metadata

Metadata

Assignees

Labels

:interactionsInteractions 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