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/06/22 02:37:48 UTC

[GitHub] [incubator-echarts] bt4baidu opened a new issue #12840: [Candlestick][itemStyle]Cannot customize color and color0 by callback function

bt4baidu opened a new issue #12840:
URL: https://github.com/apache/incubator-echarts/issues/12840


   ### What problem does this feature solve?
   There are special sticks, for example limitUP/ limitDOWN which is meaningful to the market trend. 
   It will be very helpful if we can set different color for such sticks, for example: 
   {
   up: color red,
   limitUP: color yellow,
   down: color green,
   limitDOWN: color: blue
   }
   
   某些K线对行情发展有重要的意义,如涨停/跌停,希望可以给这些K线设置不同的颜色,给用户一目了然的提示,如可以设置:
   {
   上涨:红色,
   涨停:黄色,
   下跌:绿色,
   跌停:蓝色
   }
   
   ### What does the proposed API look like?
   color and color0 can be customized by a callback function, for example:
   ```javascript
           series: [
               {
                   name: 'Dow-Jones index',
                   type: 'candlestick',
                   data: data.values,
                   itemStyle: {
                       color: function(param){...},
                       color0: function(param){...},
                   }
               }]
   ```
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   


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



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


[GitHub] [incubator-echarts] bt4baidu closed issue #12840: [Candlestick][itemStyle]Cannot customize color and color0 by callback function

Posted by GitBox <gi...@apache.org>.
bt4baidu closed issue #12840:
URL: https://github.com/apache/incubator-echarts/issues/12840


   


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



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


[GitHub] [incubator-echarts] bt4baidu edited a comment on issue #12840: [Candlestick][itemStyle]Cannot customize color and color0 by callback function

Posted by GitBox <gi...@apache.org>.
bt4baidu edited a comment on issue #12840:
URL: https://github.com/apache/incubator-echarts/issues/12840#issuecomment-648110918


   Find a way to realize this request, code example as following:
   
   ```javascript 
          if (pc && c === h && ((c - pc) * 100 / pc).toFixed(2) >= 9.9)
             values.push({
               value: [o, c, l, h],
               itemStyle: {
                 color: '#FFFF00',
                 color0: 'green',
                 borderColor: null,
                 borderColor0: null
               }
             })
           else
             values.push([o, c, l, h])
   ```
   Close this issue.


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



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


[GitHub] [incubator-echarts] bt4baidu commented on issue #12840: [Candlestick][itemStyle]Cannot customize color and color0 by callback function

Posted by GitBox <gi...@apache.org>.
bt4baidu commented on issue #12840:
URL: https://github.com/apache/incubator-echarts/issues/12840#issuecomment-648110918


   Find a way to realize this request, code example as following:
   
   `        if (pc && c === h && ((c - pc) * 100 / pc).toFixed(2) >= 9.9)
             values.push({
               value: [o, c, l, h],
               itemStyle: {
                 color: '#FFFF00',
                 color0: 'green',
                 borderColor: null,
                 borderColor0: null
               }
             })
           else
             values.push([o, c, l, h])
   `
   Close this issue.


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



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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12840: [Candlestick][itemStyle]Cannot customize color and color0 by callback function

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12840:
URL: https://github.com/apache/incubator-echarts/issues/12840#issuecomment-647235142


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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



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