alxnddr opened a new pull request, #19602: URL: https://github.com/apache/echarts/pull/19602
## Brief Information This pull request is in the type of: - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? The pull request fixes the logic of computing stacked on points of stacked areas which fixes areas overflow on null values when `connectNulls` is true. Stacked on value can be `NaN` when: 1) When the value of series exists but there is no series below it or the series it is stacked on do not have suitable values according to `stackStrategy` 2) When the value of series itself is `NaN` The `getStackedOnPoint` function behaved the same in both scenarios, when the stacked on value is `NaN` it decided that the area should be stacked on the `valueStart` of the series coordinates. However, when the value of series itself is `NaN` the stacked on value should be NaN as well for `connectNulls` option to work correctly and just connect the line without dropping it to the start of coordinates. ### Fixed issues Closes https://github.com/apache/echarts/issues/19598 Closes https://github.com/apache/echarts/issues/17135 ## Details There is an existing test case `area-stack.html` which has a chart affected by the issue. ### Before: What was the problem? Yellow and blue areas have enabled `connectNulls` so the lines in the middle are connected but areas drop to the start of coordinates. <img width="1442" alt="Screenshot 2024-02-08 at 4 29 21 PM" src="https://github.com/apache/echarts/assets/14301985/1cd0ce0f-7cf3-4cd2-a147-2844130e49bf"> ### After: How does it behave after the fixing? After the fix not only the lines are connected but also areas. <img width="1439" alt="Screenshot 2024-02-08 at 4 28 39 PM" src="https://github.com/apache/echarts/assets/14301985/3f772843-f36f-48b7-bc39-607850bdd9a6"> ## Document Info One of the following should be checked. - [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). ### Related test cases or examples to use the new APIs `area-stack.html -> line break` ## Others ### Merging options - [ ] Please squash the commits into a single one when merging. ### Other information - -- 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]
