aloktomarr commented on issue #21685:
URL: https://github.com/apache/echarts/issues/21685#issuecomment-5004077332

   Can I pick this issue?
   
   I checked the cause :- 
   In [calculateStack]() (`src/processor/dataStack.ts`), the [stackStrategy === 
'all']() branch matches unconditionally, 
   
   so when a lower series' value is `null`/`'-'` (stored as [NaN]()), 
   
   [sum = addSafe(sum, NaN)]() becomes [NaN]() and the loop `break`s.
   
   the upper series' bar disappears. The positive/negative/samesign strategies 
avoid this because their [val > 0]() / [val < 0]() checks reject [NaN](); `all` 
had no such guard.
   
   Fix : -
   
   guard the all branch with !isNaN(val) so null values are excluded from the 
stack (matching the other strategies) instead of corrupting the sum. Added a 
unit test. 
   
   Raising a PR.


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