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/11/30 08:36:45 UTC

[GitHub] [echarts] geekpeng opened a new issue, #17994: [Feature] 怎么在 tooltip 底部显示数据做汇总或者其他的额外计算

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

   ### What problem does this feature solve?
   
   在使用 5.3之后 使用 valueFormatter 可以显示方便去格式化显示series的数据
   
   但是在需要做一些折扩展显示: 如下图  需要在 tooltip 底部显示数据的汇总 ..  平均值   在tooltip 的顶部格式化显示日期就不得不放弃使用 valueFormatter 而需要使用原来的 formatter 方法
   
   
   <img width="393" alt="image" src="https://user-images.githubusercontent.com/5426866/204747098-c42ec56d-ac47-406c-953f-f751723f4b39.png">
   
   
   
   ### What does the proposed API look like?
   
   
   希望可以增加一些方法来处理 头部跟底部的 显示
   
   tooltip: {
       trigger: 'axis',
       headerFormatter: header => `${new Date(header).toDateString()}`,
       valueFormatter: value => `${value.toFixed(2)}`,
       footerFormatter: params => {
             //do process 计算汇总数据
       }
     }


-- 
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] Ovilia commented on issue #17994: [Feature] 怎么在 tooltip 底部显示数据做汇总或者其他的额外计算

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

   This seems to be a nice feature but I'm not sure if it should be integrated in ECharts because users may have varied requirement for the tooltip and it is expected to use custom render formatter in these cases. 


-- 
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 #17994: [Feature] 怎么在 tooltip 底部显示数据做汇总或者其他的额外计算

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17994:
URL: https://github.com/apache/echarts/issues/17994#issuecomment-1331808549

   @geekpeng 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] How to display data at the bottom of the tooltip for summary or other additional calculations
   
   **BODY**
   
   ### What problem does this feature solve?
   
   After using 5.3, use valueFormatter to display the data that is convenient to format and display series
   
   But when you need to do some folding and expansion display: as shown in the figure below, you need to display the summary of the data at the bottom of the tooltip.. The average value is formatted at the top of the tooltip to display the date, so you have to give up using valueFormatter and use the original formatter method
   
   
   <img width="393" alt="image" src="https://user-images.githubusercontent.com/5426866/204747098-c42ec56d-ac47-406c-953f-f751723f4b39.png">
   
   
   
   ### What does the proposed API look like?
   
   
   I hope that some methods can be added to handle the display of the head and bottom
   
   tooltip: {
       trigger: 'axis',
       headerFormatter: header => `${new Date(header).toDateString()}`,
       valueFormatter: value => `${value.toFixed(2)}`,
       footerFormatter: params => {
             //do process calculate summary data
       }
     }
   </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