Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using allowBrushingLastHistogramBin on last bar only #2224

Closed
nickofthyme opened this issue Nov 1, 2023 · 0 comments · Fixed by #2227
Closed

Error using allowBrushingLastHistogramBin on last bar only #2224

nickofthyme opened this issue Nov 1, 2023 · 0 comments · Fixed by #2227
Assignees
Labels
bug Something isn't working :interactions Interactions related issue :xy Bar/Line/Area chart related

Comments

@nickofthyme
Copy link
Collaborator

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

@nickofthyme nickofthyme added bug Something isn't working :interactions Interactions related issue :xy Bar/Line/Area chart related labels Nov 1, 2023
@nickofthyme nickofthyme self-assigned this Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :interactions Interactions related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant