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

Heatmap time buckets should use value from timeScale #1165

Closed
nickofthyme opened this issue May 20, 2021 · 4 comments · Fixed by #1253 or #1462
Closed

Heatmap time buckets should use value from timeScale #1165

nickofthyme opened this issue May 20, 2021 · 4 comments · Fixed by #1253 or #1462
Assignees
Labels
bug Something isn't working :heatmap Heatmap/Swimlane chart related issue Impact:High released Issue released publicly

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented May 20, 2021

Describe the bug
When using the Heatmap spec with a time scale, the bucket values are trivial computed and don't always align with the values on the data. This causes charts to render without the cells that should appear the in given domain.

Expected behavior
Min and max domain values should be extended to include the full extent of partial buckets. This could be done using the timeScale.rawTcks.

Screenshots
image

Version (please complete the following information):

  • Elastic Charts: @latest

This is also related to handling partial time buckets in heatmap. Now lens is just increasing the domain to include the partial buckets as if they were full buckets which is not ideal. See https://github.com/elastic/kibana/pull/97978/files/6283fb0d54cfa1c8e482ffad4b249e294750f02a..356109c161583af3ec60a69be57c2e96e1521cc5#diff-ecf0195846e85c9002680a385d9afe155d27ad5de1c696bdf5f08101201a440fR88-R100

Kibana Cross Issues
elastic/kibana#97978 (comment)

@nickofthyme nickofthyme added bug Something isn't working :heatmap Heatmap/Swimlane chart related issue labels May 20, 2021
@nickofthyme nickofthyme self-assigned this May 20, 2021
@nickofthyme
Copy link
Collaborator Author

Maybe generally have an option on the time scales to extend partial buckets.

@markov00 markov00 added this to To do in Heatmap Beta Jun 22, 2021
@markov00 markov00 assigned markov00 and unassigned nickofthyme Jul 9, 2021
@markov00 markov00 moved this from To do to In progress in Heatmap Beta Jul 14, 2021
@markov00 markov00 moved this from In progress to To do in Heatmap Beta Jul 14, 2021
@markov00 markov00 moved this from To do to In progress in Heatmap Beta Jul 14, 2021
Heatmap Beta automation moved this from In progress to Done Jul 30, 2021
markov00 added a commit that referenced this issue Jul 30, 2021
Heatmaps with a time scale on the X-axis now adjust the rendered time range to fully cover the edges when a custom domain is used. We also took this opportunity to clean and abstract the code used for computing and handling date and time. The library is now able to abstract from the underlying implementation library (moment or luxon at the moment), allowing us to experiment and work with diverse libraries removing some tech debt.

fix #1165
github-actions bot pushed a commit that referenced this issue Aug 6, 2021
# [33.2.0](v33.1.0...v33.2.0) (2021-08-06)

### Bug Fixes

* heatmap snap domain to interval ([#1253](#1253)) ([b439182](b439182)), closes [#1165](#1165)
* hex colors to allow alpha channel ([#1274](#1274)) ([03b4f42](03b4f42))

### Features

* **bullet:** the tooltip shows up around the drawn part of the chart only ([#1278](#1278)) ([a96cbb4](a96cbb4))
* **legend:** multiline labels with maxLines option ([#1285](#1285)) ([e0eb096](e0eb096))
@dej611
Copy link
Contributor

dej611 commented Oct 20, 2021

I think this is still broken in some scenarios. At least is really easy to reproduce in Lens with a time range bigger than 2 days.

Here's a Codesandbox with a Lens configuration with the issue: https://codesandbox.io/s/snowy-lake-mesbd?file=/src/App.tsx

I've tested older versions of Kibana and it was broken since the initial release (Kibana 7.15)

@dej611 dej611 reopened this Oct 20, 2021
@flash1293
Copy link

I tested a bit and it seems to happen as soon as the interval of the x axis is larger than 2 hours

@markov00 markov00 moved this from Done to In progress in Heatmap Beta Nov 2, 2021
@markov00 markov00 moved this from In progress to To do in Heatmap Beta Nov 2, 2021
@markov00 markov00 moved this from To do to In progress in Heatmap Beta Nov 3, 2021
Heatmap Beta automation moved this from In progress to Done Nov 9, 2021
@nickofthyme
Copy link
Collaborator Author

🎉 This issue has been resolved in version 39.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :heatmap Heatmap/Swimlane chart related issue Impact:High released Issue released publicly
Projects
No open projects
Heatmap Beta
  
Done
4 participants