bmampaey commented on issue #21364:
URL: https://github.com/apache/echarts/issues/21364#issuecomment-4925711891

   In file src/processor/dataStack.ts :
   // Considering positive stack, negative stack and empty data
                       if (
                           stackStrategy === 'all' // single stack group
                           || (stackStrategy === 'positive' && val > 0)
                           || (stackStrategy === 'negative' && val < 0)
                           || (stackStrategy === 'samesign' && sum >= 0 && val 
> 0) // All positive stack
                           || (stackStrategy === 'samesign' && sum <= 0 && val 
< 0) // All negative stack
                       ) {
                           // The sum has to be very small to be affected by the
                           // floating arithmetic problem. An incorrect result 
will probably
                           // cause axis min/max to be filtered incorrectly.
                           sum = addSafe(sum, val);
                           stackedOver = val;
                           break;
                       }
   if val is null, and stackStrategy === 'all' , when `sum = addSafe(sum, 
val);` is executed, sum becomes null
   if val is null, and stackStrategy === 'samesign', because `&& val > 0` 
evaluates to False,   `sum = addSafe(sum, val);` is not executed
   
   There should be a safegard that val is not null


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