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 2021/07/28 04:43:29 UTC

[GitHub] [echarts] aloybach edited a comment on issue #15220: Support for adding images programmatically and improvement to the formatter function

aloybach edited a comment on issue #15220:
URL: https://github.com/apache/echarts/issues/15220#issuecomment-887922957


   Hi,
   I experienced the same thing in:  backgroundcolor { image: function (value) { return value} }
   Why function can't read yAxis "value" ?
   Even though the function works as it should in
   itemStyle: {
   color: function(c) returncountryColors[c.value[0]] || '#5470c6';}
   },
   Is this a bug or is it  " backgroundcolor {image: } " can not be used for dynamic variables ?
   
   Best Regards,
   
   ---
   Below are a part of my script of "bar race" :
   ```ts
   yAxis: [{
     inverse: true,
     type: 'category',
     max: 14,
     axisLabel: {
        show: true,
        textStyle: {fontSize: 14},					
        formatter: function(value){return '{yaxPLabel|'+value+'}{yaxPSymbol|}';}, 
        rich: {
           yaxPLabel: {
              align: 'left',
              padding: [0, 10, 0, 0]
   	},
   	yaxPSymbol: {
   	   height: 15, width: 10,
   	   align: 'right', padding: 5,
   	   backgroundColor: {
   	      image: function(value){return provinceSymbols[value.toString] || provinceSymbols['Texas'];}
   	   }
   	}
        }
      },					
      animationDurationUpdate: axisDurationUpdate,
      animationEasingUpdate: 'linear'
   }],
   ```


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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