Antti-Palola opened a new pull request, #20872:
URL: https://github.com/apache/echarts/pull/20872

   Support implemented by inverting the extents at input and handling the input 
as absolute value and finally mapping everything back to negative axes in 
inverted order.
   
   Added test cases for passing through 0 power and new a new file 
ogScale-negative.html.
   
   <!-- Please fill in the following information to help us review your PR more 
efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [] bug fixing
   - [x] new feature
   - [ ] others
   
   
   
   
   ### What does this PR do?
   
   <!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   
   Add support for plotting negative values on Log scales.
   
   
   ### Fixed issues
   
   - Sort of resolves: https://github.com/apache/echarts/issues/15558 but will 
not allow plotting both positive and negative on same axis. A split axis would 
be needed. One could also argue that for most cases you should never plot 
negative and positive on same axis as it skews the scales, although it could be 
done maybe when smallest exponent is 0.
   - Resolves: https://github.com/apache/echarts/issues/17459.
   
   Fix a previous PR https://github.com/apache/echarts/pull/16547 more 
generically and correctly.
   
   
   ## Details
   
   ### Before: What was the problem?
   
   Negative values could not be plotted with log scaling.
   
   
   
   ### After: How does it behave after the fixing?
   
   Log scale can now be used
   
   Before: nothing is drawn 
   ![Screenshot 2025-03-27 at 23 06 
24](https://github.com/user-attachments/assets/0c084dbe-df36-48e9-8780-6dc5c00c2bc9)
   
   After 
   ![Screenshot 2025-03-27 at 23 04 
38](https://github.com/user-attachments/assets/711e556c-058d-4b8e-b59f-dc74613d5397)
   
   
   
   
   ## 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
   
   There is no mention of negative values having problems in docs.
   
   ## Misc
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   N.A.
   
   
   
   ## 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]

Reply via email to