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/09/06 09:47:49 UTC

[GitHub] [echarts] Ovilia opened a new pull request, #17624: fix(bar): fix bar axis range when maximum data is small #13128

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

   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   <!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   
   When the max value of bar series is small enough (less than 1e^-10), the bar series is not displayed because the calculated axis extent is 0.
   
   ### Fixed issues
   
   #13128
   
   ## Details
   
   ### Before: What was the problem?
   
   Bar series is not displayed.
   
   
   ### After: How does it behave after the fixing?
   
   Bar series is displayed and the axis extent is correct.
   
   
   
   ## 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
   
   N.A.
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merging.
   
   ### Other information
   
   `ROUND_SUPPORTED_PRECISION_MAX` is set to be `20`, which means if the max data is less than `1e-20`, we still have similar problems. But this PR is meaningful because when `precision` is not provided, we should not use `10` for default because this introduces another new concept and causes further confusions. Instead, we should use `20` to make the precision logic constant.
   


-- 
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] pissang commented on pull request #17624: fix(bar): fix bar axis range when maximum data is small #13128

Posted by GitBox <gi...@apache.org>.
pissang commented on PR #17624:
URL: https://github.com/apache/echarts/pull/17624#issuecomment-1242948475

   @Ovilia In some of the echarts code we use the precision from the input data. For example. if input data is `0.1` and `0.3`. Then the precision should be `1`. If input data is `1e-11`, then the precision is `11`


-- 
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] Ovilia commented on pull request #17624: fix(bar): fix bar axis range when maximum data is small #13128

Posted by GitBox <gi...@apache.org>.
Ovilia commented on PR #17624:
URL: https://github.com/apache/echarts/pull/17624#issuecomment-1244960271

   @pissang But if the input data is `0.1 + 0.2`, using `0.30000000000000004` as precision is not as expected, right?


-- 
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 #17624: fix(bar): fix bar axis range when maximum data is small #13128

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

   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).
   
   The pull request is marked to be `PR: author is committer` because you are a committer of this project.


-- 
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] pissang commented on pull request #17624: fix(bar): fix bar axis range when maximum data is small #13128

Posted by GitBox <gi...@apache.org>.
pissang commented on PR #17624:
URL: https://github.com/apache/echarts/pull/17624#issuecomment-1239036584

   `(0.1 + 0.2).toFixed(20)` can't fix the rounding error.


-- 
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] Ovilia commented on pull request #17624: fix(bar): fix bar axis range when maximum data is small #13128

Posted by GitBox <gi...@apache.org>.
Ovilia commented on PR #17624:
URL: https://github.com/apache/echarts/pull/17624#issuecomment-1241502345

   @pissang 
   
   PlanA: If 0.30000000000000004 should be considered as 0.3, should 1e-11 be considered as 0, which makes the original issue not-a-bug? 
   
   PlanB: If a number is less than 1e-10, then the precision should be considered using `ROUND_SUPPORTED_PRECISION_MAX`, otherwise, 1e-10 is used. 
   
   Should we also provide an option on `echarts.init` to overrider `ROUND_SUPPORTED_PRECISION_MAX`?


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