-
Notifications
You must be signed in to change notification settings - Fork 14.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
feat: Adds drill to detail context menu for ECharts visualizations #20891
feat: Adds drill to detail context menu for ECharts visualizations #20891
Conversation
5fc9353
to
7c0184a
Compare
Codecov Report
@@ Coverage Diff @@
## master #20891 +/- ##
==========================================
- Coverage 66.35% 66.26% -0.09%
==========================================
Files 1767 1769 +2
Lines 67353 67464 +111
Branches 7145 7168 +23
==========================================
+ Hits 44691 44708 +17
- Misses 20834 20926 +92
- Partials 1828 1830 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@michael-s-molina Looking at the screenshot, there is one thing that needs to be added. When a BTW, why needs a |
Good point! I'll work on it.
Currently, the logic for formatting the values is contained in each plugin. Depending on the plugin type the values can be formatted differently. When exhibiting these values in the context menu and also later in the modal, we need to present the values with the exact formatting used by the plugin. At the same time, we need the original value for the endpoint. Some examples are dates, currencies, decimals, etc. |
7c0184a
to
a6eca35
Compare
@zhaoyongjie Added the time grain for |
/testenv up |
@jinghua-qa Ephemeral environment spinning up at http://54.68.14.156:8080. Credentials are |
/testenv up FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DRILL_TO_DETAIL=true |
@jinghua-qa Ephemeral environment spinning up at http://34.219.213.123:8080. Credentials are |
/testenv up FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DRILL_TO_DETAIL=true |
@michael-s-molina Ephemeral environment spinning up at http://54.148.127.0:8080. Credentials are |
I found that in treemap, if i move my mouse to the white edge and it will show drill to details too, is that expected? Screen.Recording.2022-08-02.at.9.11.42.AM.mov |
No, it's not 😆. I'll fix it. |
5b97dca
to
076a905
Compare
/testenv up FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DRILL_TO_DETAIL=true |
Fixed |
@michael-s-molina Ephemeral environment spinning up at http://35.89.204.156:8080. Credentials are |
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx
Show resolved
Hide resolved
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.
tested regression and feature flag on, LGTM
076a905
to
5eccb92
Compare
@@ -62,6 +64,13 @@ type BigNumberVisProps = { | |||
trendLineData?: TimeSeriesDatum[]; | |||
mainColor: string; | |||
echartOptions: EChartsCoreOption; | |||
onContextMenu?: ( | |||
filters: QueryObjectFilterClause[], | |||
offsetX: number, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
thanks for the new feature, quick first pass review.
if (!isEqual(this.state, nextState)) { | ||
return true; | ||
} |
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.
if (!isEqual(this.state, nextState)) { | |
return true; | |
} | |
return !isEqual(this.state, nextState) |
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.
I don't want to return unless the state changes. If the state is the same, it should execute the code below these lines.
if (!isEqual(this.state, nextState)) {
return true;
}
this.hasQueryResponseChange = nextProps.queriesResponse !== this.props.queriesResponse;
...
superset-frontend/plugins/plugin-chart-echarts/src/Radar/EchartsRadar.tsx
Show resolved
Hide resolved
@@ -84,6 +86,25 @@ export default function EchartsTreemap({ | |||
handleChange([name]); | |||
} | |||
}, | |||
contextmenu: eventParams => { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Tested each viz type and left 2 notes for issues I found, otherwise looks great! |
/testenv up FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DRILL_TO_DETAIL=true |
@geido Ephemeral environment spinning up at http://34.216.213.189:8080. Credentials are |
First of all, this looks great! A few minor issues that I found:
I believe the above are all minor issues that we can handle in separate PRs. |
@codyml @geido Great comments! Thanks again for testing the feature. My last commit fixed:
I decided to follow @geido's suggestion and tackle the remaining comments in follow-up PRs so that @codyml can rebase his PR on top of this one. I'll create tickets for them. |
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!
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
Adds drill to detail (drill-through) context menu for ECharts visualizations. The context menu is triggered when right-clicking an EChart series. Upon selecting a drill to detail option, an alert is displayed with the selected values.
The linking between the context menu and the actual feature will be handled in a future PR.
The context menu was added to all ECharts with the exception of the Tree Chart.
The feature is behind the
DRILL_TO_DETAIL
feature flag.This first iteration focuses on providing a minimal set of interaction possibilities for the ECharts. More advanced interactions like clicking on legends, subheaders, etc will be handled in follow-up PRs. Drilling to detail using metrics is not supported as well.
@kasiazjc @lauderbaugh @rusackas @codyml
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-07-27.at.2.40.50.PM.mov
TESTING INSTRUCTIONS
1 - Make sure the feature does not introduce any regression when disabled. This is the default value for the feature flag.
2 - Enable the
DRILL_TO_DETAIL
feature flag and check:Below is the import file for the dashboard shown in the video:
dashboard_export_20220727T144027.zip
ADDITIONAL INFORMATION
DRILL_TO_DETAIL