You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "NehaAwasthi9616 (via GitHub)" <gi...@apache.org> on 2024/08/30 10:37:58 UTC
[I] 🐛 Drill by functionality not working for the widgets which do not have dimensions [superset]
NehaAwasthi9616 opened a new issue, #30065:
URL: https://github.com/apache/superset/issues/30065
### Bug description
Hi Everyone
I am recently upgraded to superset 4.0.0 version specifically for drill by functionality.
Although, it is a great ad-on and helps in viewing data at much granular level, I am not able to drill down a few charts if there is no dimensions mapped in it.
For example: Bar chart, Line chart.
I am sharing an example widget I created where all the columns have been marked as dimensions, still I don't see "Drill by" enabled for me.
<img width="908" alt="drillby_diabled" src="https://github.com/user-attachments/assets/aea6c955-912a-4f41-9195-aedf86d02fdc">

However,once I put a dimension in the widget, "Drill by" gets enabled. Could you please check this issue? Is that a limitation cause there could be possibilities where we do not require dimension in widgets.
PFA screenshots for that as well:
<img width="950" alt="adddim" src="https://github.com/user-attachments/assets/33dcd98d-ce64-4214-9322-e4b4efa45011">

### How to reproduce the bug
Please
[test_drill_down.csv](https://github.com/user-attachments/files/16815680/test_drill_down.csv)
use this example data set I have prepared to reproduce this issue
### Screenshots/recordings
_No response_
### Superset version
4.0.2
### Python version
I don't know
### Node version
I don't know
### Browser
Not applicable
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] 🐛 Drill by functionality not working for the widgets which do not have dimensions [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #30065: 🐛 Drill by functionality not working for the widgets which do not have dimensions
URL: https://github.com/apache/superset/issues/30065
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] 🐛 Drill by functionality not working for the widgets which do not have dimensions [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #30065:
URL: https://github.com/apache/superset/issues/30065#issuecomment-2320808013
<!-- Greeting -->
@NehaAwasthi9616 Hello there! I'm here to help you with your Superset issue. I can assist you in solving bugs, answering questions, and becoming a contributor. Let's work together to resolve your problem.
<!-- Answer -->
The "Drill by" functionality in Superset 4.0.0 does not work for widgets without dimensions because the chart does not group data by dimension value. This is explicitly checked, resulting in the "Drill to detail" and "Drill to detail by" options being disabled <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.test.tsx)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts)</sup>.
Here are some relevant tests that illustrate this behavior:
```tsx
test('dropdown menu for supported chart, no dimensions', async () => {
renderMenu({
formData: noDimensionsFormData,
});
await expectDrillToDetailDisabled(
'Drill to detail is disabled because this chart does not group data by dimension value.',
);
await expectNoDrillToDetailBy();
});
test('context menu for supported chart, no dimensions, no filters', async () => {
renderMenu({
formData: noDimensionsFormData,
isContextMenu: true,
});
const message =
'Drill to detail is disabled because this chart does not group data by dimension value.';
await expectDrillToDetailDisabled(message);
await expectDrillToDetailByDisabled(message);
});
test('context menu for supported chart, no dimensions, 1 filter', async () => {
renderMenu({
formData: noDimensionsFormData,
isContextMenu: true,
filters: [filterA],
});
const message =
'Drill to detail is disabled because this chart does not group data by dimension value.';
await expectDrillToDetailDisabled(message);
await expectDrillToDetailByDisabled(message);
});
```
If you need to customize the behavior of the "Drill by" functionality, you can use the `loadDrillByOptions` extension to override the default behavior:
```tsx
const loadDrillByOptions = getExtensionsRegistry().get('load.drillby.options');
```
This extension allows for custom logic to be implemented when loading drill-by options <sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx)</sup><sup>[[4]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx)</sup>.
For more details, you can refer to the [discussion on Drill Down functionality](https://github.com/apache/superset/discussions/23510#discussioncomment-5538315) which mentions that "Drill to detail" is available in recent versions, while "Drill By" is still in development <sup>[[5]](https://github.com/apache/superset/discussions/23510)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] 🐛 Drill by functionality not working for the widgets which do not have dimensions [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30065:
URL: https://github.com/apache/superset/issues/30065#issuecomment-2321522798
All that said, as it stands, this is not a bug, but the way the feature is designed. I'll move it to a DIscussion as we do with feature requests in general.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] 🐛 Drill by functionality not working for the widgets which do not have dimensions [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30065:
URL: https://github.com/apache/superset/issues/30065#issuecomment-2321520577
The drill by feature is specificially designed to work with dimensions. This is how people typically use it, e.g. going through vehicle sales by vehicle type > manufacturer > model > color, etc.
Can you give us the use case you're up against? Not many people have asked to "Drill by" with metrics/dates. I could make up use cases for it, but it would be good to know some real ones. @yousoph @michael-s-molina @villebro might be interested in the discussion. If the technical implementation is not straightforward, this may require a SIP.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org