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/12/03 02:40:12 UTC

[GitHub] [incubator-echarts] alex2wong commented on issue #11693: yAxis.splitLine.lineStyle.color 希望可以支持填充渐变色

alex2wong commented on issue #11693: yAxis.splitLine.lineStyle.color 希望可以支持填充渐变色
URL: https://github.com/apache/incubator-echarts/issues/11693#issuecomment-560972625
 
 
   实际上目前 splitLine.lineStyle.color 已经支持渐变色的,canvas 支持 LinearGradient 类型作为 strokeStyle 传入。具体例子可以查看: https://www.echartsjs.com/examples/zh/editor.html?c=line-tooltip-touch
   
   ![image](https://user-images.githubusercontent.com/10528482/70015676-0c6fad80-15b9-11ea-85d7-a5c4f5d867e2.png)
   如图,y轴的splitLine 已经在水平方向呈现**线性渐变色**样式
   
   修改原示例代码的yAxis 部分如下:
   ```
   yAxis: {
           type: 'value',
           axisTick: {
               inside: true
           },
           splitLine: {
               show: true,
               lineStyle: {
                   width: 1,
                   color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                       offset: 0,
                       color: 'rgba(0,0,0,.5)'
                   }, {
                       offset: .5,
                       color: '#000'
                   }, {
                       offset: 1,
                       color: '#eee'
                   }])
               }
           },
           axisLabel: {
               inside: true,
               formatter: '{value}\n'
           },
           z: 10
       },
   ```
   
   
   
   

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