echarts [Feature] Tooltip highlight the current hovered data

d4so4syb  于 4个月前  发布在  Echarts
关注(0)|答案(2)|浏览(55)

What problem does this feature solve?

When you hover over a data point, the tooltip does not highlight the data point so when you have several data points, it is not obvious what you are hovering on.

What does the proposed API look like?

Can there be an emphasis option in the tooltip? Or an extra parameter passed into the formatter so that we can manually set styling based on which data is currently highlighted.

cu6pst1q

cu6pst1q1#

The hovered data has different colors. Maybe it's just because the default emphasis color is not very distinct from the normal one. You can set the color by emphasis.color .

knsnq2tg

knsnq2tg2#

The hovered data has different colors. Maybe it's just because the default emphasis color is not very distinct from the normal one. You can set the color by emphasis.color .

Hi Ovillia, yes it does have emphasis, but also I have a lot of data series (circa 20) so colours can be similar. The idea is that the tooltip will highlight the data point in the tooltip itself so that you can see the name + colour together.

EDIT: I also have another use case for adding a "currently hovered" parameter to the tooltip formatter. I want to add just the hovered data point, but also the total of the series. But currently I cannot tell which I'm hovering over. Hope that makes sense.

相关问题