-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
fix(plugin-chart-echarts): xAxis scale is not correct when time grain is quarter #19686
Conversation
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! Thanks for the fix.
Codecov Report
@@ Coverage Diff @@
## master #19686 +/- ##
==========================================
- Coverage 66.47% 66.46% -0.02%
==========================================
Files 1681 1681
Lines 64468 64451 -17
Branches 6607 6608 +1
==========================================
- Hits 42857 42839 -18
Misses 19917 19917
- Partials 1694 1695 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@villebro Ephemeral environment spinning up at http://54.188.199.148:8080. Credentials are |
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.
Wonderful improvement @stephenLYZ ! ❤️
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
This PR fixes the xAxis scale in the time series chart V2 when time grain is quarter, which is different from the time series chart V1. The bar chart looks like it contains three months. Actually, the bar width does not represent how many months it contains but is an optimization done by echart itself to look better, echart does not know whether it is month or quarter.
So here we use echart.minInterval to make sure that xAxis scale is the same as time grain, which does not lead to user misunderstanding.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
before
Time-series chart (nvd3)
Time-series chart V2 (echart)
after
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION