dongyikuan919 opened a new pull request, #21891:
URL: https://github.com/apache/echarts/pull/21891

   ## Brief Information
   
   - [x] bug fixing
   
   ### What does this PR do?
   
   Keeps Sankey node coordinates finite when the graph has only one layer.
   
   ### Fixed issues
   
   Fixes #21890.
   
   ## Details
   
   ### Before
   
   With positive-valued nodes and no links, all nodes are at depth 0. The 
breadth scale divides by 0, so multiplying it by each node depth yields `NaN` 
positions and invalid SVG geometry.
   
   ### After
   
   The single layer is positioned at the start of the layout axis for left and 
justify alignment, or at the end for explicit right alignment. Both 
orientations keep positive node thickness and finite positions.
   
   ## Document Info
   
   - [x] This PR doesn't relate to document changes
   
   ## Misc
   
   ### Related test cases
   
   - Added six SVG regression cases combining the two orientations with 
justify, left, and right alignment. All six failed before the fix and pass now.
   - Recorded identical layouts before and after the fix for six linked 
controls that also include an isolated node. Adding a link through `setOption` 
on the same chart produced valid layouts in both orientations.
   - `npm test -- --runInBand --coverage=false` — 200 passed. TypeScript and 
production lint checks also passed.
   


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