revintec opened a new issue, #20731:
URL: https://github.com/apache/echarts/issues/20731

   ### What problem does this feature solve?
   
   
https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrD-bFTQAgTupABGwGBgwAC2BABEAEwApOmh6HhU4fQs0cQe6OkAjOlEAGYBhfywdiEkycD-kCAxzWBGrKxUHBmMuHh5zXWcKcwsIwAUjBwcAJTwAHyxHgJUcQqDw83o9DB4nVQAdP7ArEsrq82t6A4khUZUhLCizdukQmARN8qgBWAAMPFgmQAzBCoZkACyQzJVAAckKq0JBGIRAHZkQA2MHWfKkCjUOj-CDQZSQ6CMFLearpJ6kv6CYRiGFwzKI5FojFYnH4qFEknHTwU2RUmkyemMohZFkeZ6wWx2ADcQA
   
   <img width="1165" alt="Image" 
src="https://github.com/user-attachments/assets/4bf7cccf-33c2-4cb2-a18e-c7851ed7bf1f";
 />
   
   ---
   in the tooltip formatter callback, `arr` contains only legend selected 
series, making it almost impossible to access unselected series
   I wanna achieve something like this, notice the series unselected by legend 
are still shown in the tooltip
   
   <img width="1728" alt="Image" 
src="https://github.com/user-attachments/assets/1a975e8c-909d-4a9f-83c7-dfc07bc16910";
 />
   
   accessing the unselected data through `getOption` is not viable here, as one 
can unselect all series, making it impossible to get data index through 
`arr[0].dataIndex`. and different series may have different data layout, we 
can't simply reuse dataIndex
   
   I did a lot of code reading but can't find where the `dataByCoordSys` is 
actually populated(checked `filterSeries` and related code but no luck
   can you point me the code path? 
   
   ### What does the proposed API look like?
   
   modify the `formatter` callback signature like this, it should be mostly 
backward compatible
   if concerned, we could add `toString` and `toJSON` to the new object, or 
just append a new parameter instead
   
   <img width="702" alt="Image" 
src="https://github.com/user-attachments/assets/d390fb64-2cec-41ed-948d-d529c1b8376f";
 />
   
   or we we could do the following, it works according to ECMA standards 
although it may seems surprising
   
   <img width="525" alt="Image" 
src="https://github.com/user-attachments/assets/8d2d7c6a-1dce-4ecd-ace9-659bd2ac2199";
 />
   


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