You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/02/19 15:13:28 UTC

[GitHub] [echarts] andreasgerstmayr opened a new pull request #16547: feat(chart): support negative values in logarithmic axes

andreasgerstmayr opened a new pull request #16547:
URL: https://github.com/apache/echarts/pull/16547


   The logarithm of negative values is not defined.
   However, in the case of a logarithmic chart axis, it makes sense to
   define log(-x) as -log(x), to support logarithmic axes with negative
   values.
   
   Cf. 'symlog' in matplotlib
   
   Resolves: #15558
   
   <!-- 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?
   
   Supports negative values in logarithmic axes.
   
   
   
   ### Fixed issues
   
   - #15558
   
   
   ## Details
   
   ### Before: What was the problem?
   
   Axes with logarithmic scales didn't support negative values, because `Math.log()` of a negative number is undefined (`NaN`). Therefore the ticks on the yAxis disappeared entirely.
   
   
   
   ### After: How is it fixed in this PR?
   
   Negative values for logarithmic scales work by defining `log(-x) = -log(x)` and negative values are shown on logarithmic axes.
   
   
   
   ## Misc
   
   ### Related test cases or examples to use the new APIs
   
   `test/bar-log-negative.html`
   
   
   
   ## 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: commits-unsubscribe@echarts.apache.org

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



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


[GitHub] [echarts] echarts-bot[bot] commented on pull request #16547: feat(chart): support negative values in logarithmic axes

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #16547:
URL: https://github.com/apache/echarts/pull/16547#issuecomment-1046040296


   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).


-- 
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-unsubscribe@echarts.apache.org

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



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