Skip to content
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

Drilldown #1

Merged
merged 2 commits into from
Sep 25, 2021
Merged

Drilldown #1

merged 2 commits into from
Sep 25, 2021

Conversation

EvilDrW
Copy link

@EvilDrW EvilDrW commented Sep 19, 2021

SUMMARY

Add a "drilldown" feature to echarts:pie and nvd3:dist_bar. Majority of design taken from apache#14688.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

See video on the PR linked above and https://askstylo.slack.com/files/U028GAL04PP/F02EQEDG7AA/_dev__superset_-_google_chrome_2021-09-18_18-02-05.mp4

TESTING INSTRUCTIONS

Create a pie or bar chart with multiple "group by" or "series" fields which form a coherent hierarchy. Click the "enable drill down" control in the chart setup control panel. On graph refresh, the chart should only show entries from the top level in the hierarchy. Then click one of the resulting series to view the next deeper level in the hierarchy, etc..

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: DASHBOARD_DRILL_DOWN
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@EvilDrW
Copy link
Author

EvilDrW commented Sep 19, 2021

@Alek12313 and @yevgenstylo, please review

@EvilDrW EvilDrW merged commit 73b62ae into master Sep 25, 2021
@junryan
Copy link

junryan commented Nov 4, 2021

can you save the pie chart when buildQuery.js add ' ...(drillDown && {
groupby: [DrillDown.getColumn(ownState.drilldown, groupby)],
filters: [...(baseQueryObject.filters || []), ...DrillDown.getFilters(ownState.drilldown, groupby)]
})'
?
when drilldown enabled,it take effect,but i can not save it, the ownstate is undified
superset: tag 1.3.0

@junryan
Copy link

junryan commented Nov 4, 2021

when saving the chart ,i reset the drilldown and is work!
eg:
if (drillDown) {
const groupby = formData.groupby;
const ownState = options.ownState?options.ownState:{'drilldown':{'hierarchy':groupby,'filters':[],'currentIdx':0}};
console.log('buildQuery:ownState ',ownState)
console.log('buildQuery:groupby ',groupby)
console.log('buildQuery:DrillDown.getColumn(ownState.drilldown, groupby) ',DrillDown.getColumn(ownState.drilldown, groupby))
queryObject = { ...queryObject,
...(drillDown && {
groupby: [DrillDown.getColumn(ownState.drilldown, groupby)],
filters: [...(baseQueryObject.filters || []), ...DrillDown.getFilters(ownState.drilldown, groupby)]
})
};
}

@EvilDrW
Copy link
Author

EvilDrW commented Nov 5, 2021

you are right. working on a fix for that right now.

@EvilDrW
Copy link
Author

EvilDrW commented Nov 5, 2021

see askstylo/superset-ui#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants