echarts Exclude series from axis tooltip

ht4b089n  于 2022-11-19  发布在  Echarts
关注(0)|答案(4)|浏览(192)

What problem does this feature solve?

Currently, there is no way to add a line series only as an indicator. A series should be configurable to trigger an axis tooltip or not.
I provided a simple example using two line series, the step line should not trigger the axis tooltip, but it does.

What does the proposed API look like?

Provide an excludeFromAxisTooltip option to e.g. series-line, so we can decide which series should trigger the tooltip.

cngwdvgl

cngwdvgl1#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe to our mailing list .

Have a nice day! 🍵

zzwlnbp8

zzwlnbp82#

You can try to set tooltip.formatter so that if the seriesId is 0, render nothing.

ao218c7q

ao218c7q3#

Thanks @Ovilia.
This works in the very simple example I provided.
However, I have a more complex chart, where I show information in the tooltip based on the x value and y value of the first series.
This is what it looks like:

If I hover over the step line series, I have no choice but to render nothing (since I don't want to show the value of the stepline in the tooltip) which results in tooltip flickering.

rekjcdws

rekjcdws4#

I will see what we can do when fixing axisPoint snapping #7651 , which is planed to be done before the end of this year.

相关问题