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 2020/01/10 11:31:27 UTC

[GitHub] [incubator-echarts] yufeng04 opened a new pull request #12016: fix bug #11517 the precision of markLine

yufeng04 opened a new pull request #12016: fix bug #11517 the precision of markLine
URL: https://github.com/apache/incubator-echarts/pull/12016
 
 
   <!-- 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?
   Modified the logic of processing precision in markLine
   
   <!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   
   
   
   ### Fixed issues
   fixed issue #11517 
   <!--
   - #xxxx: ...
   -->
   
   
   ## Details
   
   ### Before: What was the problem?
   All types of markLine  process  the precision  by the user's value or the default value.
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   
   
   ### After: How is it fixed in this PR?
   Configuration without precision: the precision of average is 2 and the precision of other type is the precision of value.
   Precision of configuration is X: The precision of all type is the X
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   
   
   ## Usage
   
   ### Are there any API changes?
   
   - [ ] The API has been changed.
   
   <!-- LIST THE API CHANGES HERE -->
   
   
   
   ### Related test cases or examples to use the new APIs
   
   NA.
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [echarts] github-actions[bot] commented on pull request #12016: fix bug #11517 the precision of markLine

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


   This PR has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR. We are sorry for this but 2 years is a long time and the code base has been changed a lot. Thanks for your contribution anyway.


-- 
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] github-actions[bot] closed pull request #12016: fix bug #11517 the precision of markLine

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #12016:
URL: https://github.com/apache/echarts/pull/12016


   


-- 
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] [incubator-echarts] Ovilia commented on a change in pull request #12016: fix bug #11517 the precision of markLine

Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #12016: fix bug #11517 the precision of markLine
URL: https://github.com/apache/incubator-echarts/pull/12016#discussion_r365632734
 
 

 ##########
 File path: src/component/marker/MarkLineView.js
 ##########
 @@ -67,9 +67,12 @@ var markLineTransform = function (seriesModel, coordSys, mlModel, item) {
         mlTo.coord[baseIndex] = Infinity;
 
         var precision = mlModel.get('precision');
-        if (precision >= 0 && typeof value === 'number') {
+        if (precision && precision >= 0 && typeof value === 'number') {
 
 Review comment:
   Check if `precision` is `'auto'` instead of `null`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia commented on a change in pull request #12016: fix bug #11517 the precision of markLine

Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #12016: fix bug #11517 the precision of markLine
URL: https://github.com/apache/incubator-echarts/pull/12016#discussion_r365632971
 
 

 ##########
 File path: src/component/marker/MarkLineView.js
 ##########
 @@ -67,9 +67,12 @@ var markLineTransform = function (seriesModel, coordSys, mlModel, item) {
         mlTo.coord[baseIndex] = Infinity;
 
         var precision = mlModel.get('precision');
-        if (precision >= 0 && typeof value === 'number') {
+        if (precision && precision >= 0 && typeof value === 'number') {
             value = +value.toFixed(Math.min(precision, 20));
         }
+        if (precision == null && mlType === 'average') {
+            value = +value.toFixed(2);
 
 Review comment:
   I'm not sure. But it seems a little odd to me that the average shows 2 digits by default while the median shows something like `0.12345678`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia commented on a change in pull request #12016: fix bug #11517 the precision of markLine

Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #12016: fix bug #11517 the precision of markLine
URL: https://github.com/apache/incubator-echarts/pull/12016#discussion_r365632665
 
 

 ##########
 File path: src/component/marker/MarkLineModel.js
 ##########
 @@ -32,7 +32,7 @@ export default MarkerModel.extend({
 
         //symbolRotate: 0,
 
-        precision: 2,
+        // precision: 2,
 
 Review comment:
   A more common way to do is to set `precision` to be `'auto'` here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [echarts] github-actions[bot] commented on pull request #12016: fix bug #11517 the precision of markLine

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


   This PR has been automatically closed because it has not had recent activity. Sorry for that and we are looking forward to your next contribution.


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