You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "justinpark (via GitHub)" <gi...@apache.org> on 2023/04/12 20:59:48 UTC

[GitHub] [superset] justinpark commented on a diff in pull request #23649: fix: Zero values on Dual Line axis bounds

justinpark commented on code in PR #23649:
URL: https://github.com/apache/superset/pull/23649#discussion_r1164648680


##########
superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js:
##########
@@ -844,12 +844,14 @@ function nvd3Vis(element, props) {
       }
 
       chart.yDomain1([
-        yAxisBounds[0] || ticks1[0],
-        yAxisBounds[1] || ticks1[ticks1.length - 1],
+        isDefined(yAxisBounds[0]) ? yAxisBounds[0] : ticks1[0],

Review Comment:
   nit: how about using [nullish coalescing operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing)?
   
   ```suggestion
         yAxisBounds[0] ?? ticks1[0],
   ```



-- 
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