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/07/16 07:10:34 UTC

[GitHub] [incubator-echarts] qiaoxiayu opened a new issue #12977: 图例标记的颜色不随某个series中itemStyle的color变化而变化

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


   ### Version
   4.8.0
   
   ### Steps to reproduce
   option = {
       tooltip: {
           trigger: 'axis',
           axisPointer: {
               type: 'shadow'
           }
       },
       legend: {
           data: ['Forest', 'Steppe', 'Desert', 'Wetland']
       },
       toolbox: {
           show: true,
           orient: 'vertical',
           left: 'right',
           top: 'center',
           feature: {
               mark: {show: true},
               dataView: {show: true, readOnly: false},
               magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
               restore: {show: true},
               saveAsImage: {show: true}
           }
       },
       xAxis: [
           {
               type: 'category',
               axisTick: {show: false},
               data: ['2012', '2013', '2014', '2015', '2016']
           }
       ],
       yAxis: [
           {
               type: 'value'
           }
       ],
       series: [
           {
               name: 'Forest',
               type: 'bar',
               barGap: 0,
               data: [320, 332, 301, 334, 390],
               itemStyle:{
                   color:(params)=>{
                       return 'white'
                   }
               }
           },
           {
               name: 'Steppe',
               type: 'bar',
               data: [220, 182, 191, 234, 290],
               itemStyle:{
                   color:(params)=>{
                       return '#79D4F0'
                   }
               }
           },
           {
               name: 'Desert',
               type: 'bar',
               data: [150, 232, 201, 154, 190],
               itemStyle:{
                   color:(params)=>{
                       return 'rgba(205,229,170,1)'
                   }
               }
           },
           {
               name: 'Wetland',
               type: 'bar',
               data: [98, 77, 101, 99, 40],
               itemStyle:{
                   color:'#00FF00'
               }
           }
       ]
   };
   
   ### What is expected?
   series->itemStyle->color(params)=>{} callback function 影响图例标记的颜色
   
   ### What is actually happening?
   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



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