fix(plugin-chart-echarts): normalize temporal string groupbys #24134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
#23339 introduced the possibility of normalizing non-UTC timestamps so that they produced correctly formatted timestamps. However, the normalizer wasn't being used in the ECharts plugin, causing string based non-timezone timestamps to display incorrectly when used as a groupby.
This adds a call to the
normalizeTimestamp
util informatSeriesName
to ensure that string based timestamps are normalized prior to being fed to the timestamp formatter.AFTER
Now the timestamp is formatted correctly:
![image](https://private-user-images.githubusercontent.com/33317356/239521508-eaffc2c4-4dc1-422a-bb0d-967bec06f4d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTA5MzAsIm5iZiI6MTcyNjExMDYzMCwicGF0aCI6Ii8zMzMxNzM1Ni8yMzk1MjE1MDgtZWFmZmMyYzQtNGRjMS00MjJhLWJiMGQtOTY3YmVjMDZmNGQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDAzMTAzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIxYWFmNzlkOWYwZGM0ZjhmMjU0ODU3ZThjMGZkMzk5MWVlMTBjMTg0ODJjNGMwNTdmMzA5NmRjZTY3NzE5YzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UxjEc4uIkrMT9oe6lekSy4yNiyy2AHvF9IbudcsmaOI)
BEFORE
Previously the timestamp was assumed to be in local timezone, causing the formatted timestamp to be offset by the UTC offset (this was run in UTC+0200):
![image](https://private-user-images.githubusercontent.com/33317356/239521723-8efecd0d-5548-4fa0-91a6-8a1c341d7b7c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTA5MzAsIm5iZiI6MTcyNjExMDYzMCwicGF0aCI6Ii8zMzMxNzM1Ni8yMzk1MjE3MjMtOGVmZWNkMGQtNTU0OC00ZmEwLTkxYTYtOGExYzM0MWQ3YjdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDAzMTAzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwNTkzZjY1MzZkODliMDRmMzFjOWMxMmE2NmQ3Y2VhNzQ0YzdhOGQ4ZmFkMDE0YTMwZGJjNjdlMjczNTJkZDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MvAStc1EIq93ciMt9PSIM8TjwfyUZKqUrilyvFjckas)
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION