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

Broken graph when using "Offset series time by" on TSVB with series Stacked #120449

Closed
Kilhog opened this issue Dec 5, 2021 · 7 comments · Fixed by #123398
Closed

Broken graph when using "Offset series time by" on TSVB with series Stacked #120449

Kilhog opened this issue Dec 5, 2021 · 7 comments · Fixed by #123398
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) 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

@Kilhog
Copy link

Kilhog commented Dec 5, 2021

Kibana version: 7.15.2
Elasticsearch version: 7.15.2
Server OS version: Latest Docker
Browser version: Safari
Browser OS version: 15.1
Original install method (e.g. download page, yum, from source, etc.): Docker
Describe the bug:

When I try do make a TSBV with my current data on 1 year (01/01/2021 - 16/12/2021), and add a second series on the same graph with the same parameters except the "Offset series time by" set to 1y, I have a weird behaviour. The line of the first series (without time shift) have gap after the date of the time change (summer / winter time), but I can still view the data with the "popover dialog"

Steps to reproduce:

  1. Create TSVB with a first series (cumulative sum, grouped by terms, with Chart type: line and Stacked: stacked)
  2. Create a second series (cumulative sum with no grouped by, with Chart type: line and Stacked: none and time shift 1y)
  3. Use time range from 01/01 to 16/12
  4. Offset the second series by 1 year

PS : I will explain in a futur issue why a choose time range 01/01 to 16/12 and not 01/01 to 31/12, there is a another bug involved. I try to break down the problem report in #120441

Expected behavior:

Chart line with no gap

Screenshot:

Graph bug :

Screenshot 2021-12-05 at 11 37 52

First series configuration :

Screenshot 2021-12-05 at 11 37 11

Screenshot 2021-12-05 at 11 37 05

Second series configuration :

Screenshot 2021-12-05 at 11 37 30

Screenshot 2021-12-05 at 11 37 23

Winter / Summer time change in France :

144708924-161a562d-c994-47c3-9490-91f78be4fc59

@Kilhog Kilhog added the bug Fixes for quality problems that affect the customer experience label Dec 5, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 5, 2021
@nickpeihl nickpeihl added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Dec 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Dec 9, 2021
@stratoula
Copy link
Contributor

@Kilhog thanx a lot for submitting this. Can you please check if the gaps are gone when you turn to Yes the Ignore daylight time setting? You can find it on the Panel options tab

image

@stratoula stratoula added the Feature:TSVB TSVB (Time Series Visual Builder) label Dec 9, 2021
@Kilhog
Copy link
Author

Kilhog commented Dec 9, 2021

@stratoula same behaviour with "Ignore daylight time" to true

@stratoula
Copy link
Contributor

Thank you, we will look into this :) cc @alexwizp

@stratoula
Copy link
Contributor

@Kilhog we managed to replicate it. We will try to apply a fix in a future version.
I could propose though to use Lens instead of TSVB.

It seems that the bug is not present there and judging from your TSVB configuration, you can re-create it in Lens.

Lens support timeshift and cumulative sum.

This is an example of how you can configure it in Lens. I added two layers (one area stacked and one normal). The first layer is using cumulative sum, the second one is using average but you can use whatever metric you want. It is shifted by 1 year.

image

About the TSVB bug, we investigated it with @flash1293

@stratoula stratoula added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed triage_needed labels Jan 5, 2022
@stratoula
Copy link
Contributor

An update here for whoever would like to take it.
The problem is the utc used here

moment.utc(row[0]).add(offsetValue, offsetUnit).valueOf(),
as I mentioned above.

If you remove the utc, the bug is fixed but unfortunately it creates another bug. It doesn't work fine with the fix that was applied here #98484

To be more specific, I have 3 points, on 27, 28 and 29 of March 2020. I shift them 1y. (28 of march happens the DST in greece). So with removing the utc, the Ignore daylight switch doesnt work correctly. Here in the screenshot it should show 5:00 but it shows 4:00 instead. So we should ensure that both things work correctly.

image

Note: I also tried to fetch the timezone from the request, set it on the timeshift and then set it to its previous value but this also doesn't solve the problem

@flash1293
Copy link
Contributor

As discussed, this is how we can align this (and fix the bug discovered during investigation):

  • Use moment in the right time zone in the time_shift response processor linked above as described by Stratoula
  • If "Ignore daylight time" is set to true, switch back to moment.utc in the time_shift processor and also disable the new time axis (as this feature is not compatible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) 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
5 participants