namannitr commented on issue #15306:
URL: https://github.com/apache/echarts/issues/15306#issuecomment-5360496633

   Following up on “we need to make sure they [aggregate methods] are 
implemented correctly” before a core migration.
   
   The experimental implementation in 
[echarts-simple-transform](https://github.com/100pah/echarts-simple-transform) 
still has two SUM correctness issues that should not be copied into core as-is:
   
   1. **Published `dist` still seeds `SUM` with `0`**, so a group with one row 
sums to `0` and every other group **drops the first row**. The TypeScript 
source was fixed in 100pah/echarts-simple-transform#3 (2021) but never 
rebuilt/released; jsDelivr still serves the broken bundle. See 
100pah/echarts-simple-transform#1.
   2. **String-valued cells concatenate** (`'400' + '100' === '400100'`). 
Typical `objectRows` SQL/JSON sources hit this. See 
100pah/echarts-simple-transform#6.
   
   Fix + tests + rebuilt `dist`: 
https://github.com/100pah/echarts-simple-transform/pull/9
   
   Draft core migration #16903 should take the same two behaviors: seed `SUM` 
from the first in-group numeric value (or skip NaN), and coerce with `Number` / 
the existing dataset parsers rather than `+` on `OptionDataValue`.
   
   Separately, aggregate alone does not solve long-format → multiple series 
(that needs a pivot / groupBy reshape). Opened #21742 for that, linked from 
#16083.


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