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 2019/11/21 08:51:45 UTC

[GitHub] [incubator-echarts] catherchen opened a new issue #11693: yAxis.splitLine.lineStyle.color 希望可以支持填充渐变色

catherchen opened a new issue #11693: yAxis.splitLine.lineStyle.color 希望可以支持填充渐变色
URL: https://github.com/apache/incubator-echarts/issues/11693
 
 
   ### What problem does this feature solve?
   随着可视化渐变色的流行趋势,我们特别希望可以在echarts的各个组件里面都能支持渐变色填充。
   ![image](https://user-images.githubusercontent.com/30284748/69322082-2dfa9c00-0c7f-11ea-9d45-b2d4a9f0fdef.png)
   
   
   ### What does the proposed API look like?
   yAxis.splitLine.lineStyle.color Color
   [ default: "#000" ]
   颜色可以使用 RGB 表示,比如 'rgb(128, 128, 128)',如果想要加上 alpha 通道表示不透明度,可以使用 RGBA,比如 'rgba(128, 128, 128, 0.5)',也可以使用十六进制格式,比如 '#ccc'。除了纯色之外颜色也支持渐变色和纹理填充
   color: {
       type: 'linear',
       x: 0,
       y: 0,
       x2: 0,
       y2: 1,
       colorStops: [{
           offset: 0, color: 'red' // 0% 处的颜色
       }, {
           offset: 1, color: 'blue' // 100% 处的颜色
       }],
       global: false // 缺省为 false
   }
   // 径向渐变,前三个参数分别是圆心 x, y 和半径,取值同线性渐变
   color: {
       type: 'radial',
       x: 0.5,
       y: 0.5,
       r: 0.5,
       colorStops: [{
           offset: 0, color: 'red' // 0% 处的颜色
       }, {
           offset: 1, color: 'blue' // 100% 处的颜色
       }],
       global: false // 缺省为 false
   }
   // 纹理填充
   color: {
       image: imageDom, // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
       repeat: 'repeat' // 是否平铺, 可以是 'repeat-x', 'repeat-y', 'no-repeat'
   }
   
   <!-- 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org