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/05/19 07:36:12 UTC

[GitHub] [echarts] LoveLuanQi1202 opened a new pull request #14994: fix(tooltip):provide rich option to tooltip. close #12232

LoveLuanQi1202 opened a new pull request #14994:
URL: https://github.com/apache/echarts/pull/14994


   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:s
   
   - [x] bug fixing
   - [x] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   <!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   like the option of  title.textStyle.rich , i add rich option to tooltip
   
   
   ### Fixed issues
   
   
   - #12232: need rich option to set richText for tooltip
   
   
   
   ## Details
   
   ### Before: What was the problem?
   
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
    textStyle  lineHeight/borderWidth...  is not available to tooltip
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   ```
   option = {
       xAxis: {
           type: 'category',
           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
       },
       yAxis: {
           type: 'value'
       },
       series: [{
           data: [150, 230, 224, 218, 135, 147, 260],
           type: 'line',
           
       }],
       tooltip:{
               show:true,
               textStyle:{
                   borderWidth:20,
                   lineHeight: 56,
               }
           }
   };
   ```
   
   
   ### After: How is it fixed in this PR?
   
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
   By imitating the textStyle setting of title, I use the 'createTextStyle' function to generate ZRText style
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   ```
   option = {
       xAxis: {
           type: 'category',
           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
       },
       yAxis: {
           type: 'value'
       },
       series: [{
           data: [150, 230, 224, 218, 135, 147, 260],
           type: 'line',
           
       }],
       tooltip:{
               trigger: "axis",
                   formatter: function (params) {
                       return `{abg|${params[0].value}},123`;
                   },
                   textStyle: {
                       lineHeight: 100,
                       color: "#ff0000",
                       rich: {
                           abg: {
                               color: "#ff00ff",
                               fontStyle: "italic",
                               fontWeight: "bold",
                               fontFamily: "Microsoft YaHei",
                               fontSize: 20,
                               lineHeight: 56,
                               width: 100,
                               height: 90,
                               textBorderColor: "red",
                           },
                       },
                   },
           }
   };
   ```
   
   
   ## Misc
   
   <!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
   
   - [ ] The API has been changed (apache/echarts-doc#xxx).
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   NA.
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### Other information
   


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


[GitHub] [echarts] LoveLuanQi1202 commented on pull request #14994: fix(tooltip):provide rich option to tooltip. close #12232 and #14136

Posted by GitBox <gi...@apache.org>.
LoveLuanQi1202 commented on pull request #14994:
URL: https://github.com/apache/echarts/pull/14994#issuecomment-850281264


   > @LoveLuanQi1202 Hi, we are going to review it in 5.2.0
   
   Thanks


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


[GitHub] [echarts] pissang commented on pull request #14994: fix(tooltip):provide rich option to tooltip. close #12232 and #14136

Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #14994:
URL: https://github.com/apache/echarts/pull/14994#issuecomment-850084976


   @LoveLuanQi1202 Hi, we are going to review it in 5.2.0


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


[GitHub] [echarts] LoveLuanQi1202 commented on pull request #14994: feat(tooltip):provide rich option to tooltip. close #12232 and #14136

Posted by GitBox <gi...@apache.org>.
LoveLuanQi1202 commented on pull request #14994:
URL: https://github.com/apache/echarts/pull/14994#issuecomment-968508950


   hello ,Now the version is 5.2.2, what should I do to get my pull request to merge in, is there something wrong with my code


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


[GitHub] [echarts] echarts-bot[bot] commented on pull request #14994: fix(tooltip):provide rich option to tooltip. close #12232

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #14994:
URL: https://github.com/apache/echarts/pull/14994#issuecomment-843831812


   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).


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


[GitHub] [echarts] LoveLuanQi1202 commented on pull request #14994: fix(tooltip):provide rich option to tooltip. close #12232 and #14136

Posted by GitBox <gi...@apache.org>.
LoveLuanQi1202 commented on pull request #14994:
URL: https://github.com/apache/echarts/pull/14994#issuecomment-849562110


   I submitted this pull request for a few days, but no one responded to me


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


[GitHub] [echarts] xixihhhh commented on pull request #14994: feat(tooltip):provide rich option to tooltip. close #12232 and #14136

Posted by GitBox <gi...@apache.org>.
xixihhhh commented on pull request #14994:
URL: https://github.com/apache/echarts/pull/14994#issuecomment-973881061


   Need this feat


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