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] Wrong x-axis formatting if "dateFormat" configuration property is not specified #84899

Merged
merged 4 commits into from
Dec 4, 2020

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Dec 3, 2020

Summary

TSVB to calculate labels for the x-axis uses two configuration properties: dateFormat and dateFormat:scaled. We faced with a problem when one of property is not configured. Instead of using a default format we show timestamp values:

image

on the other hand, all of our classical visualizations correctly deal with that case and use a default formatter from momentjs library. See e.g. Area visualization:
image

TSVB should work the same

In my PR I removed one If statement responsible for that. I can't find any reason why it was added

Steps to reproduce:

  1. Open Stack Management -> Advanced Settings and cleanup dateFormat property
    image

  2. Open TSVB visualization and see x-axis labels on Time Series tab
    image

Expected behavior: I expect to see user friendly labels instead of timestamp

@alexwizp alexwizp self-assigned this Dec 3, 2020
@alexwizp alexwizp added Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Dec 3, 2020
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

LGTM

@alexwizp
Copy link
Contributor Author

alexwizp commented Dec 4, 2020

@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.

LGTM, tested locally and works fine

@alexwizp alexwizp marked this pull request as ready for review December 4, 2020 09:58
@alexwizp alexwizp requested a review from a team December 4, 2020 09:58
@elasticmachine
Copy link
Contributor

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

@alexwizp
Copy link
Contributor Author

alexwizp commented Dec 4, 2020

@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.8MB 1.8MB -5.0B

History

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

@alexwizp alexwizp merged commit 71f863e into elastic:master Dec 4, 2020
alexwizp added a commit to alexwizp/kibana that referenced this pull request Dec 4, 2020
… is not specified (elastic#84899)

* [TSVB] Wrong x-axis formatting if "dateFormat" configuration property is not specified

* Update create_xaxis_formatter.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
alexwizp added a commit to alexwizp/kibana that referenced this pull request Dec 4, 2020
… is not specified (elastic#84899)

* [TSVB] Wrong x-axis formatting if "dateFormat" configuration property is not specified

* Update create_xaxis_formatter.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/vis.js
alexwizp added a commit that referenced this pull request Dec 4, 2020
… is not specified (#84899) (#85032)

* [TSVB] Wrong x-axis formatting if "dateFormat" configuration property is not specified

* Update create_xaxis_formatter.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/vis.js
alexwizp added a commit that referenced this pull request Dec 4, 2020
… is not specified (#84899) (#85031)

* [TSVB] Wrong x-axis formatting if "dateFormat" configuration property is not specified

* Update create_xaxis_formatter.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@alexwizp alexwizp deleted the tsvb-formatting branch January 16, 2021 15:26
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.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants