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 2019/07/24 08:26:36 UTC

[GitHub] [incubator-echarts] ChuChencheng opened a new issue #10909: 使用配置来设置柱图柱子阴影(背景色)

ChuChencheng opened a new issue #10909: 使用配置来设置柱图柱子阴影(背景色)
URL: https://github.com/apache/incubator-echarts/issues/10909
 
 
   ### What problem does this feature solve?
   目前如果要设置柱图柱子的阴影,需要额外添加一个 series 来实现阴影,如:
   
   https://echarts.baidu.com/examples/editor.html?c=bar-gradient
   
   这要求开发者预先知道数据的最大值。
   在数据最大值未知的情况下要设置阴影,则需要去计算,且无法保证与内部 y 轴计算出的最大值一致。
   
   使用配置直接在内部支持柱图柱子阴影,可以避免在外部去计算最大值。
   
   ### What does the proposed API look like?
   考虑在 `series[i]-bar.itemStyle` 中加上一个 `backgroundColor` 选项(默认透明)来设置柱图柱子阴影(背景色):
   
   ```javascript
   series: [
     {
       type: 'bar',
       itemStyle: {
         color: '',  // 柱子颜色
         backgroundColor: '',  // 柱子阴影(背景色)
       }
     }
   ]
   ```
   
   或者:
   
   ```javascript
   series: [
     {
       type: 'bar',
       backgroundColor: '',  // 柱子阴影(背景色)
       itemStyle: {
         color: '',  // 柱子颜色
       }
     }
   ]
   ```
   
   谢谢
   
   <!-- 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


With regards,
Apache Git Services

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