Justin-ZS opened a new pull request, #21219:
URL: https://github.com/apache/echarts/pull/21219

   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Fix line area rendering issue when dataset dimension name is empty string.
   <img width="958" height="373" alt="截屏2025-08-22 16 51 00" 
src="https://github.com/user-attachments/assets/f058dd4e-595f-47b0-9420-0533ef5d6cde";
 />
   
   ### Fixed issues
   
   - #20756
   
   ## Details
   
   ### Before: What was the problem?
   
   When `dataset.dimensions[].name` is set to an empty string `""`, the line 
chart with `areaStyle` renders incorrectly.
   
   **Root cause:** In `getStackedOnPoints` function, empty string dimension 
name fails truthiness check:
   ```typescript
   if (!dataCoordInfo.valueDim) {  // Empty string "" is falsy
       return [];
   }
   ```
   
   This causes the function to return empty `stackedOnPoints` array, breaking 
area rendering.
   
   ### After: How does it behave after the fixing?
   
   Changed the check to only reject `null`/`undefined` values:
   ```typescript
   if (dataCoordInfo.valueDim == null) {  // Only reject null/undefined
       return [];
   }
   ```
   
   Empty string dimension names are now treated as valid dimension names for 
area rendering.
   
   ## Document Info
   
   - [x] This PR doesn't relate to document changes
   - [ ] The document should be updated later
   - [ ] The document changes have been made in apache/echarts-doc#xxx
   
   ## Misc
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merging.
   


-- 
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: commits-unsubscr...@echarts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to