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/05/29 07:57:13 UTC

[GitHub] [incubator-echarts] sxmpasch commented on issue #10564: axisLabel.renderMode: 'html'

sxmpasch commented on issue #10564: axisLabel.renderMode: 'html'
URL: https://github.com/apache/incubator-echarts/issues/10564#issuecomment-496828096
 
 
   If you need a workaround now, you could use the rich option 
   - documentation : https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text
   - example: https://ecomfe.github.io/echarts-examples/public/editor.html?c=pie-rich-text
   
   ```
   var weatherIcons = {
       'Sunny': './data/asset/img/weather/sunny_128.png',
       'Cloudy': './data/asset/img/weather/cloudy_128.png',
       'Showers': './data/asset/img/weather/showers_128.png'
   };
   
   option = {
       xAxis: {
           type: 'category',
           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
       },
       yAxis: {
           type: 'value',
           axisLabel: {
               formatter: '{a|}{value}',
               rich: {
                   a:{
                       backgroundColor: {
                           image: weatherIcons.Sunny,
                       },
                       height: 40,
                       color: 'red',
                   }
               }
           }
           
       },
       series: [{
           data: [820, 932, 901, 934, 1290, 1330, 1320],
           type: 'line'
       }]
   };
   
   ```

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