-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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(Explore): Force different color for same metrics in Mixed Time-Series #18603
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18603 +/- ##
==========================================
- Coverage 66.30% 66.29% -0.02%
==========================================
Files 1595 1595
Lines 62630 62596 -34
Branches 6308 6304 -4
==========================================
- Hits 41528 41499 -29
+ Misses 19453 19452 -1
+ Partials 1649 1645 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
Outdated
Show resolved
Hide resolved
@stephenLYZ @zhaoyongjie I updated the PR in a way that conforms with the way the chart labels behave, by adding a suffix With this update the user can now customize the label colors fully and it should still guarantee that same metrics across different queries, use different colors by default. Please watch the video below that shows the new behaviour. DEV.Mixed.Time-Series.series.color.2.mp4 |
SUMMARY
This PR forces the
colorScale
to return a different color when the same metrics are found across the two queries in order to apply contrasting colors. It appends a(1)
to the name of the metric in series B when found in series A so that thecolorScale
will treat it as a different value and it behaves consistently with how the chart renames these labels.BEFORE
DEV.Mixed.Time-Series.series.color.1.mp4
AFTER
DEV.Mixed.Time-Series.series.color.2.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION