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/04 15:28:28 UTC

[GitHub] [incubator-echarts] LianJilu opened a new pull request #11977: Fix 11042 add cross-shaped color to candlestick

LianJilu opened a new pull request #11977: Fix 11042 add cross-shaped color to candlestick 
URL: https://github.com/apache/incubator-echarts/pull/11977
 
 
   <!-- 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
   
   
   
   
   ### What does this PR do?
   
   <!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   
   
   
   ### Fixed issues
   
   #11042 
   
   
   ## Details
   
   ### Before: What was the problem?
   
   can not set cross-shaped color when openVal equal to closeVal
   
   
   
   ### After: How is it fixed in this PR?
   
   add color1 default value is '#000' and '#FFF'(dark theme)
   add borderColor1 default value is '#000' and '#FFF'(dark theme)
   can set custom cross-shaped color like color0, borderColor0
   
   ## Usage
   
   ### Are there any API changes?
   
   - [ ] The API has been changed.
   
   series-candlestick.itemStyle.color1:
   series-candlestick.itemStyle.borderColor1:
   
   
   
   ### 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 #11977: Fix 11042 add cross-shaped color to candlestick

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


   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] commented on pull request #11977: Fix 11042 add cross-shaped color to candlestick

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


   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


[GitHub] [echarts] github-actions[bot] closed pull request #11977: Fix 11042 add cross-shaped color to candlestick

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


   


-- 
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] LianJilu commented on a change in pull request #11977: Fix 11042 add cross-shaped color to candlestick

Posted by GitBox <gi...@apache.org>.
LianJilu commented on a change in pull request #11977: Fix 11042 add cross-shaped color to candlestick 
URL: https://github.com/apache/incubator-echarts/pull/11977#discussion_r366403564
 
 

 ##########
 File path: src/chart/candlestick/candlestickLayout.js
 ##########
 @@ -195,11 +195,7 @@ function getSign(data, dataIndex, openVal, closeVal, closeDim) {
         sign = 1;
     }
     else {
-        sign = dataIndex > 0
-            // If close === open, compare with close of last record
-            ? (data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1)
-            // No record of previous, set to be positive
-            : 1;
+        sign = 0;
 
 Review comment:
   this scenarios may occurs in limit at the opening(开盘即涨停或开盘即跌停), it means the value of open close highest lowest are the same, but doji's highest and lowest are not the same, I will modify the logic later.

----------------------------------------------------------------
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] pissang commented on issue #11977: Fix 11042 add cross-shaped color to candlestick

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #11977: Fix 11042 add cross-shaped color to candlestick 
URL: https://github.com/apache/incubator-echarts/pull/11977#issuecomment-570998059
 
 
   Thanks!

----------------------------------------------------------------
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 #11977: Fix 11042 add cross-shaped color to candlestick

Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #11977: Fix 11042 add cross-shaped color to candlestick 
URL: https://github.com/apache/incubator-echarts/pull/11977#discussion_r366787007
 
 

 ##########
 File path: src/chart/candlestick/candlestickLayout.js
 ##########
 @@ -195,11 +195,7 @@ function getSign(data, dataIndex, openVal, closeVal, closeDim) {
         sign = 1;
     }
     else {
-        sign = dataIndex > 0
-            // If close === open, compare with close of last record
-            ? (data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1)
-            // No record of previous, set to be positive
-            : 1;
+        sign = 0;
 
 Review comment:
   @LianJilu Thanks for the info. That makes sense. Then I think extra option like `useColor2ForDoji` is not required but you have to check if the open and close value are the same.

----------------------------------------------------------------
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 #11977: Fix 11042 add cross-shaped color to candlestick

Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #11977: Fix 11042 add cross-shaped color to candlestick 
URL: https://github.com/apache/incubator-echarts/pull/11977#discussion_r365749910
 
 

 ##########
 File path: src/chart/candlestick/candlestickLayout.js
 ##########
 @@ -195,11 +195,7 @@ function getSign(data, dataIndex, openVal, closeVal, closeDim) {
         sign = 1;
     }
     else {
-        sign = dataIndex > 0
-            // If close === open, compare with close of last record
-            ? (data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1)
-            // No record of previous, set to be positive
-            : 1;
+        sign = 0;
 
 Review comment:
   I don't think you should delete this logic because there are scenarios (see #6583) where doji is expected to use `color0` or `color1` depending on previous values. Current logic is https://github.com/apache/incubator-echarts/issues/6583#issuecomment-326882236.
   
   I'd suggest providing a new option like `useColor2ForDoji` for choosing whether to use `color2`. The default value should be `false` to compat with the old behavior.

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