You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/09/21 05:23:40 UTC

[GitHub] Ovilia commented on issue #9109: 柱状图可否定制一组数据不同颜色(根据正负值)

Ovilia commented on issue #9109: 柱状图可否定制一组数据不同颜色(根据正负值)
URL: https://github.com/apache/incubator-echarts/issues/9109#issuecomment-423416890
 
 
   ```js
       series: [{
           type: 'bar',
           data:[220, -182, 191, 234, -290, 330, 310],
           itemStyle: {
               color: function (p) {
                   return p.value > 0 ? 'red' : 'green';
               }
           }
       }]
   ```
   
   http://gallery.echartsjs.com/editor.html?c=xGWbfRNIcn&v=1

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org