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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to