bito-code-review[bot] commented on code in PR #40746:
URL: https://github.com/apache/superset/pull/40746#discussion_r3469381467


##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -889,10 +889,6 @@ export default function transformProps(
     name: xAxisTitle,
     nameGap: convertInteger(xAxisTitleMargin),
     nameLocation: 'middle',
-    ...(xAxisType === AxisType.Category &&
-      groupBy.length === 0 && {
-        triggerEvent: true,
-      }),
     axisLabel: {

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Cross-filter axis clicks broken</b></div>
   <div id="fix">
   
   Removing `triggerEvent: true` breaks cross-filter on categorical X-axis 
labels. This setting was added in PR #41111 to enable axis label click events 
for users without dimensions. Without it, ECharts will not emit click events on 
axis labels, breaking the `handleXAxisChange` handler in EchartsTimeseries.tsx 
(lines 207-242) which implements issue #25334 functionality.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ```
    --- 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    +++ 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    @@ -888,6 +888,9 @@ export default function transformProps(
         type: xAxisType,
         name: xAxisTitle,
         nameGap: convertInteger(xAxisTitleMargin),
         nameLocation: 'middle',
    +    ...(xAxisType === AxisType.Category &&
    +      groupBy.length === 0 && {
    +        triggerEvent: true,
    +      }),
         axisLabel: {
           // When rotation is applied on time axes, hideOverlap can
           // aggressively hide the last label. Rotated labels already
   ```
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #6fcd18</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to