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/13 11:12:45 UTC

[GitHub] [incubator-echarts] Ovilia commented on a change in pull request #11977: Fix 11042 add cross-shaped color to candlestick

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