li-jia-nan opened a new issue, #20579:
URL: https://github.com/apache/echarts/issues/20579
### What problem does this feature solve?
`tooltip.formatter` 方法接受一个 `params` 参数,当 `tooltip.trigger = item` 的,`params`
是当前 hover 的 series data,当 `tooltip.trigger = axis` 时,`params` 是一个数组,包含所有的
series data
我需要在 `tooltip.trigger = item` 的时候,在 tooltip 中也展示所有的 series 信息,所以我希望
`tooltip.trigger = item` 的,也可以获取到所有的 series data
---
The `tooltip.formatter` method accepts a params. When `tooltip.trigger =
item`, `params` is the series data of the current hover. When `tooltip.trigger
= axis`, `params` is an array containing all series data.
I need to display all series info in the tooltip when `tooltip.trigger =
item`, so I hope to get all series data when `tooltip.trigger = item`.
### What does the proposed API look like?
当 `trigger = 'item'` 时可以新增一个 context 参数:
```ts
tooltip: {
trigger: 'item',
formatter: (params, context) => {
console.log(context);
}
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]