You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/10/18 08:11:37 UTC

[GitHub] [incubator-echarts] 100pah commented on a change in pull request #8490: Add null checks for setAxisModel

100pah commented on a change in pull request #8490: Add null checks for setAxisModel
URL: https://github.com/apache/incubator-echarts/pull/8490#discussion_r336367486
 
 

 ##########
 File path: src/component/dataZoom/AxisProxy.js
 ##########
 @@ -481,8 +481,8 @@ function setAxisModel(axisProxy, isRestore) {
     var useOrigin = isRestore || (percentWindow[0] === 0 && percentWindow[1] === 100);
 
     axisModel.setRange(
-        useOrigin ? null : +valueWindow[0].toFixed(precision),
-        useOrigin ? null : +valueWindow[1].toFixed(precision)
+        (useOrigin || valueWindow[0] === null) ? null : +valueWindow[0].toFixed(precision),
+        (useOrigin || valueWindow[1] === null) ? null : +valueWindow[1].toFixed(precision)
 
 Review comment:
   Currently, The items in `valueWindow` should not be `null` by design.
   I found that you are using the previous version of echarts, where the items in `valueWindow` might be `null`. 
   This issue does not exist in the current version of echarts. 
   
   Please double check the code (v4.4.0):
   https://github.com/apache/incubator-echarts/blob/0e065ceba1d3db4c29a927fb94bbfb70b26ba6a9/src/component/dataZoom/AxisProxy.js#L192
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org