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

Lens: Incorrect first tick mark with custom panel time range #148872

Closed
th0ger opened this issue Jan 13, 2023 · 4 comments · Fixed by #155749
Closed

Lens: Incorrect first tick mark with custom panel time range #148872

th0ger opened this issue Jan 13, 2023 · 4 comments · Fixed by #155749
Assignees
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:ElasticCharts Issues related to the elastic-charts library Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@th0ger
Copy link

th0ger commented Jan 13, 2023

Kibana version: 8.5.2
Browser version: Chrome 108.0.5359.125

Describe the bug:
When customizing the panel time range of a lens visualization, the first tick mark on the time-axis is calculated incorrectly.

Steps to reproduce:

  1. Create lens visualization (in my example cumulative bar chart)
  2. Customize panel time range to (2022-12-01 00:00:00.000 -> now)
  3. The first tick mark is incorrectly "28th" (December)

Expected behavior:
First tick mark should read "1st".
Alternatively ommit the first tick mark.

Screenshots (if relevant):
image

Any additional context:
The tooltip show correct date/value. The bar chart shows correct value.

@th0ger th0ger added the bug Fixes for quality problems that affect the customer experience label Jan 13, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 13, 2023
@th0ger
Copy link
Author

th0ger commented Jan 13, 2023

Another example with start date "2022-12-02", tick still shows "28th" (should be 1st).
image

Skiping one week ahead to "2022-12-08", the tick now shows another incorrect value "5th" (should be 8th).
image

I.e. it shows the day-number of the beginning og the week (monday) instead of showing the day-number of the first bin.
image

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jan 13, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 13, 2023
@nickofthyme
Copy link
Contributor

@markov00 this looks like a bug to me. The 28th could be referring to November 28th, even so the month would be wrong, but that's a stretch given the 12h interval. What do you think?

@markov00
Copy link
Member

markov00 commented Jan 13, 2023

It renders fine but the logic we have in place doesn't works correctly in this case:

  • we are showing Year Weeks, so 28th Nov, 5th Dec, 12th December and so on.
  • the first layer 28th,5th,12th refers to Weeks of Year but the second refers to Months
  • the left side of the axis keeps the last label of the visible interval around (it keeps the 28th until the 5th label pushes it to the left) to replace it
    I definitely see how this looks wrong, we have to double check the Time Rasters we are defining and fix this
    Here you can see the behaviour in a chart where you can pan the axis and zoom in https://elastic.github.io/elastic-charts/?path=/story/timeslip-alpha--timeslip-prototype&globals=theme:light;background:white
Screen.Recording.2023-01-13.at.19.22.04.mov

I've created an issue to track this defect in elastic-charts, thanks @th0ger for the finding!

@markov00 markov00 added the Feature:ElasticCharts Issues related to the elastic-charts library label Jan 13, 2023
@drewdaemon drewdaemon added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Jan 19, 2023
nickofthyme added a commit that referenced this issue Jun 6, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`55.0.0` ->
`57.0.1`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/55.0.0/57.0.1)
|
[![age](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/57.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/57.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/57.0.1/compatibility-slim/55.0.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@elastic%2fcharts/57.0.1/confidence-slim/55.0.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Bug fixes

- Fixes #148872 relating to multilayer time axes.
- Fixes #158580 relating to heatmap selection with small multiples.

---

### Release Notes

<details>
<summary>elastic/elastic-charts</summary>

###
[`v57.0.1`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#&#8203;5700-httpsgithubcomelasticelastic-chartscomparev5700v5701-2023-04-19)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v57.0.0...v57.0.1)

##### Bug Fixes

* **axes:** start of week label on multilayer time axis
([#2035](elastic/elastic-charts#2035))
([9711233](elastic/elastic-charts@9711233))
* **deps:** update dependency @elastic/eui to ^77.2.0
([#2032](elastic/elastic-charts#2032))
([93cadcb](elastic/elastic-charts@93cadcb))
* **deps:** update dependency @elastic/eui to v78
([#2038](elastic/elastic-charts#2038))
([3feff2c](elastic/elastic-charts@3feff2c))
* **deps:** update dependency @elastic/eui to v79
([#2042](elastic/elastic-charts#2042))
([8015830](elastic/elastic-charts@8015830))
* **deps:** update dependency @elastic/eui to v80
([#2047](elastic/elastic-charts#2047))
([e6042f3](elastic/elastic-charts@e6042f3))
* **heatmap:** brushing selection values
([#2028](elastic/elastic-charts#2028))
([6a877b4](elastic/elastic-charts@6a877b4))
* **heatmap:** wrong axes labels on hover
([#2033](elastic/elastic-charts#2033))
([045fb03](elastic/elastic-charts@045fb03))

###
[`v57.0.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#&#8203;5700-httpsgithubcomelasticelastic-chartscomparev5600v5700-2023-04-19)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/82f67501967a1fad80253889462e3aaac724e060...v57.0.0)

##### Code Refactoring

- enable `noUncheckedIndexedAccess`
([#&#8203;2006](https://togithub.com/elastic/elastic-charts/issues/2006))
([f446cca](https://togithub.com/elastic/elastic-charts/commit/f446cca1691bbe5d7608845b65ea555f74e0f6af))

##### BREAKING CHANGES

-   Enables stricter type option in src and could have
    unexpected changes. This release is meant to serve as a clean break
    in case any issues arise.

###
[`v56.0.1`](https://togithub.com/elastic/elastic-charts/compare/v56.0.0...82f67501967a1fad80253889462e3aaac724e060)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v56.0.0...82f67501967a1fad80253889462e3aaac724e060)

###
[`v56.0.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#&#8203;5600-httpsgithubcomelasticelastic-chartscomparev5500v5600-2023-04-18)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v55.0.0...v56.0.0)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^76.4.0
([#&#8203;2008](https://togithub.com/elastic/elastic-charts/issues/2008))
([95176e1](https://togithub.com/elastic/elastic-charts/commit/95176e14294b36fce983f53c6c5f278da24f50b1))
- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to v77
([#&#8203;2018](https://togithub.com/elastic/elastic-charts/issues/2018))
([c079730](https://togithub.com/elastic/elastic-charts/commit/c079730dd849c34f71608df36938560566ba19d3))
- **interactions:** brushing over origin coordinates
([#&#8203;2013](https://togithub.com/elastic/elastic-charts/issues/2013))
([937feb0](https://togithub.com/elastic/elastic-charts/commit/937feb0fcf1a11c473e45dfb0da36443660e98be))
- **tooltip:** custom tooltip header context
([#&#8203;1989](https://togithub.com/elastic/elastic-charts/issues/1989))
([1e5b861](https://togithub.com/elastic/elastic-charts/commit/1e5b86106ff4c72e5a59b074e0472023ecc68164))

##### Features

- **metric:** trend with string value
([#&#8203;2011](https://togithub.com/elastic/elastic-charts/issues/2011))
([91d7695](https://togithub.com/elastic/elastic-charts/commit/91d76957d88d25e93904f73b845c47d411f4ce32))

##### BREAKING CHANGES

- **tooltip:** The `header` property of `TooltipInfo` type was
simplified to `PointerValue` as to include only relevant properties.
This change is propagated to all other types using `header` as a
`TooltipValue`. The `TooltipInfo.values` used to conditionally pass only
highlighted `TooltipValue`s when using a `customTooltip` and now
*always* passes all `values`.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41OC4yIiwidXBkYXRlZEluVmVyIjoiMzUuOTguNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nickofthyme <nicholas.partridge@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:ElasticCharts Issues related to the elastic-charts library Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants