You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "1151364285 (via GitHub)" <gi...@apache.org> on 2023/06/02 03:45:51 UTC

[GitHub] [echarts] 1151364285 opened a new issue, #18705: 为什么我的饼图legend.formatter获取不到name

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

   ### What problem does this feature solve?
   
   ![image](https://github.com/apache/echarts/assets/71425141/1e1a30bb-c9b9-4949-b366-4ee3beda4edd)
   ![image](https://github.com/apache/echarts/assets/71425141/80ba2393-622f-414b-a426-890631c9549e)
   
   
   ### What does the proposed API look like?
   
   legend: {
         formatter: function (name) {
           console.log(name)
           var data = data;
           var tarValue = "";
           for (var i = 0; i < data.length; i++) {
             if (data[i].name == name) {
               tarValue = data[i].value;
             }
           }
           return "{name|" + name + "} {value|" + tarValue + "}";
         },
         symbolKeepAspect: false,
       },


-- 
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.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] 1151364285 closed issue #18705: Why pie legend.formatter not find 'name'

Posted by "1151364285 (via GitHub)" <gi...@apache.org>.
1151364285 closed issue #18705: Why  pie legend.formatter not find 'name'
URL: https://github.com/apache/echarts/issues/18705


-- 
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 issue #18705: 为什么我的饼图legend.formatter获取不到name

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18705:
URL: https://github.com/apache/echarts/issues/18705#issuecomment-1573101060

   @1151364285 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**
   
   Why can't my pie chart legend.formatter get the name
   </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


[GitHub] [echarts] 1151364285 commented on issue #18705: Why pie legend.formatter not find 'name'

Posted by "1151364285 (via GitHub)" <gi...@apache.org>.
1151364285 commented on issue #18705:
URL: https://github.com/apache/echarts/issues/18705#issuecomment-1573247302

   resolved


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