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 2022/04/06 23:24:51 UTC

[GitHub] [echarts] Maneesh43 opened a new issue, #16843: [Feature] Ability to add icons/images in chart title.

Maneesh43 opened a new issue, #16843:
URL: https://github.com/apache/echarts/issues/16843

   ### What problem does this feature solve?
   
   Current API doesn't support adding icons/images to chart title.
   
   ### What does the proposed API look like?
   
   title:{
   image:"imagepath"
   }


-- 
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: dev-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] Maneesh43 closed issue #16843: [Feature] Ability to add icons/images in chart title.

Posted by GitBox <gi...@apache.org>.
Maneesh43 closed issue #16843: [Feature] Ability to add icons/images in chart title.
URL: https://github.com/apache/echarts/issues/16843


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] jiawulin001 commented on issue #16843: [Feature] Ability to add icons/images in chart title.

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16843:
URL: https://github.com/apache/echarts/issues/16843#issuecomment-1091659903

   You can add images to title with `textStyle.rich`. Please refer to [documentation](https://echarts.apache.org/en/option.html#title.textStyle.rich) and [examples](https://echarts.apache.org/en/tutorial.html#Rich%20Text)
   Here's an example I made for you.
   <details>
   <summary>Code sample</summary>
   
   ```
   var ROOT_PATH =
     'https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples';
   const Sunny = ROOT_PATH + '/data/asset/img/weather/sunny_128.png';
   option = {
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     title: {
       text: '{a|}Sunny Day!',
       textStyle: {
         color: 'black',
         rich: {
           a: {
             backgroundColor: {
               image: Sunny
             },
             height: 40,
             width: 50
           }
         }
       }
     },
     series: [
       {
         data: [120, 200, 150, 80, 70, 110, 130],
         type: 'bar',
         showBackground: true,
         backgroundStyle: {
           color: 'rgba(180, 180, 180, 0.2)'
         }
       }
     ]
   };
   
   ```
   </details>


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] Maneesh43 commented on issue #16843: [Feature] Ability to add icons/images in chart title.

Posted by GitBox <gi...@apache.org>.
Maneesh43 commented on issue #16843:
URL: https://github.com/apache/echarts/issues/16843#issuecomment-1092000136

   Thank you!


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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