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

[GitHub] [echarts] qmhc opened a new issue, #18785: [Feature] Tooltip 的 `valueFormatter` 支持完整的 series 参数回传

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

   ### What problem does this feature solve?
   
   现在我有一个图例包含两个系列,其中一个是柱状图 `bar` 一个是折线图 `line`,其中柱状图表示了一个具体值(万元),折线图表示进度(%)。
   
   当希望在保持原有 Tooltip 的外观仅格式化 `value` 带有单位时,由于两个系列的单位不一样,但使用 `valueFormatter` 的回调函数仅包含 `value`,无法判断当前值所在的系列。
   
   ### What does the proposed API look like?
   
   可以考虑增加第二个可选参数,传递对应的完整 series 参数,在保持原 API 不破坏的情况下增强可定制化能力。


-- 
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] plainheart commented on issue #18785: [Feature] Tooltip 的 `valueFormatter` 支持完整的 series 参数回传

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

   可以给单个系列设置单独的 `valueFormatter`


-- 
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 #18785: [Feature] Tooltip 的 `valueFormatter` 支持完整的 series 参数回传

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

   @qmhc 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] Tooltip's `valueFormatter` supports complete series parameter return
   
   **BODY**
   
   ### What problem does this feature solve?
   
   Now I have a legend with two series, one of which is a bar chart 'bar' and one is a line chart 'line', where the bar chart represents a specific value (million yuan) and the line chart represents progress (%).
   
   When you want to keep the appearance of the original Tooltip and format only 'value' with units, because the units of the two series are different, but the callback function using 'valueFormatter' only contains 'value', it is impossible to determine the series in which the current value is located.
   
   ### What does the proposed API look like?
   
   You can consider adding a second optional parameter and passing the corresponding full series parameter to enhance customizability while keeping the original API intact.
   </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