-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Conversation
… is not specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine merge upstream |
There was a problem hiding this 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
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
… 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>
… 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
… 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
… 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>
Summary
TSVB to calculate labels for the x-axis uses two configuration properties:
dateFormat
anddateFormat:scaled
. We faced with a problem when one of property is not configured. Instead of using a default format we showtimestamp
values: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:
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:
Open Stack Management -> Advanced Settings and cleanup
dateFormat
propertyOpen TSVB visualization and see x-axis labels on Time Series tab
Expected behavior: I expect to see user friendly labels instead of timestamp