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


##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -576,8 +576,11 @@ export default function transformProps(
       ? getXAxisFormatter(xAxisTimeFormat)
       : String;
 
-  const addYAxisTitleOffset = !!(yAxisTitle || yAxisTitleSecondary);
-  const addXAxisTitleOffset = !!xAxisTitle;
+  const addYAxisTitleOffset =
+    !!(yAxisTitle || yAxisTitleSecondary) &&
+    convertInteger(yAxisTitleMargin) !== 0;
+  const addXAxisTitleOffset =
+    !!xAxisTitle && convertInteger(xAxisTitleMargin) !== 0;

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Potential title overlap on zero margin</b></div>
   <div id="fix">
   
   The update conditions title offset addition on margin !== 0, potentially 
causing axis titles to overlap the chart area when margins are set to 0. 
Previously, offsets were added whenever titles existed, ensuring space. This 
matches Timeseries and BoxPlot logic but changes behavior for margin=0 cases.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #ab83e6</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