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

[TSVB] Stop inserting zeroes for null series #90861

Merged
merged 9 commits into from
Feb 23, 2021

Conversation

wylieconlon
Copy link
Contributor

@wylieconlon wylieconlon commented Feb 9, 2021

TSVB finds the series names first, and then applies the date histogram after. This leads to cases where a series will be displayed even though there is no data at all for the time bucket that it's showing.

I have created an extreme example where the last value of the series is totally missing, and it will show an empty value instead of zero. In most cases this won't happen, most users will see numbers:

Screen Shot 2021-02-03 at 2 17 14 PM

Screen Shot 2021-02-19 at 2 03 07 PM

Screen Shot 2021-02-19 at 2 03 13 PM

Fixes #90220

Checklist

@wylieconlon wylieconlon marked this pull request as ready for review February 16, 2021 15:50
@wylieconlon wylieconlon requested a review from a team February 16, 2021 15:50
@wylieconlon wylieconlon requested a review from a team as a code owner February 16, 2021 15:50
@wylieconlon wylieconlon added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Feb 16, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@wylieconlon
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor

@elasticmachine merge upstream

@stratoula
Copy link
Contributor

@wylieconlon thanx for this, it works fine! My only concern is that it also affects Count. So here the count for rpm is 0
image

and on the metric tab, the chart appears with no value
image

which may be confusing. I mean count 0 makes sense to me. I would love your thoughts on that.

@alexwizp
Copy link
Contributor

@stratoula @wylieconlon I agree with both of you. We should definitely remove that wrong 0. It confuses me from the beginning of using TSVB. Especially if we work with min/max aggregations and this zero appears. It is difficult to understand this due to lack of data or is it a real calculated value.

Small suggestion, I think from a UI point of view, in such cases it's better to se - instead of empty area.
image

For Count aggregation I'm ok with both (- , 0)

@wylieconlon
Copy link
Contributor Author

@stratoula @alexwizp thanks, I agree that this would make more sense. Will update.

@wylieconlon
Copy link
Contributor Author

@stratoula @alexwizp I fixed the default values and handling of 0 vs null.

@stratoula
Copy link
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTimeseries 1.7MB 1.7MB +149.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, works as expected, thank you @wylieconlon!

@alexwizp
Copy link
Contributor

LGTM! Tested locally, thank you for that

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test update looks good to me

@wylieconlon wylieconlon merged commit 62a0a4b into elastic:master Feb 23, 2021
@wylieconlon wylieconlon deleted the tsvb-no-zeroes branch February 23, 2021 15:32
wylieconlon pushed a commit to wylieconlon/kibana that referenced this pull request Feb 23, 2021
* [TSVB] Stop inserting zeroes for null series

* Replace empty default value with hyphen

* Stop treating 0 as false

* Fix test cases

Co-authored-by: Kibana Machine <[email protected]>
wylieconlon pushed a commit that referenced this pull request Feb 23, 2021
* [TSVB] Stop inserting zeroes for null series

* Replace empty default value with hyphen

* Stop treating 0 as false

* Fix test cases

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
wylieconlon pushed a commit that referenced this pull request Feb 23, 2021
* [TSVB] Stop inserting zeroes for null series

* Replace empty default value with hyphen

* Stop treating 0 as false

* Fix test cases

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TSVB] When using "last value" mode with terms aggregation, null data is replaced by zeroes
6 participants