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 2022/08/22 08:02:27 UTC

[GitHub] [echarts] echarts-bot[bot] commented on issue #17543: [Feature] Hope "tooltip" supports "rich". 希望“tooltip”支持“rich”

echarts-bot[bot] commented on issue #17543:
URL: https://github.com/apache/echarts/issues/17543#issuecomment-1221993597

   @leekbillow It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Feature] Hope "tooltip" supports "rich". Hope "tooltip" supports "rich"
   
   **BODY**
   
   ### What problem does this feature solve?
   
   Currently `tooltip` does not support `rich`, `renderMode:'richText'` seems to be a useless option, in WeChat applet without dom, there is no way to customize different styles.
   Currently, `rich` is not supported by `tooltip`, and `renderMode:'richText'`seems to be a useless option. In wechat applets without DOM, there is no way to customize different styles.
   ````js
   option = {
     tooltip: {
       renderMode: 'richText',
       formatter({ name, value }) {
         return `{name|${name}}:{value|${value}}`;
       },
       // invalid is invalid
       rich: {
         name: { color: 'red' },
         value: { color: 'blue' }
       },
       textStyle: {
         // invalid is invalid
         rich: {
           name: { color: 'red' },
           value: { color: 'blue' }
         }
       }
     },
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         data: [120, 200, 150, 80, 70, 110, 130],
         type: 'bar'
       }
     ]
   };
   ````
   
   ### What does the proposed API look like?
   
   `tooltip.rich`
   or
   `tooltip.textStyle.rich`
   </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: 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