echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Add option for Axis Pointer to ignore NULLs

Open tmtron opened this issue 2 years ago • 6 comments

What problem does this feature solve?

When we use a line series and set connectNulls=false the NULL data samples will not be visible, but the axis-pointer will still snap to the (invisible) point and also the tooltip will show up.

2021-08-03_08h59_54
Stackblitz example

This is confusing for some or our users: it would be good to have an option to deactivate this.

What does the proposed API look like?

maybe add:

  • axisPointer.ignoreNulls (boolean), default=false (for backward compatibility): when true, the Axis Pointer should ignore NULLS (and thus also the tooltip will not be shown)

tmtron avatar Aug 03 '21 07:08 tmtron

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 [email protected]. Please attach the issue link if it's a technical question.

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

Have a nice day! 🍵

echarts-bot[bot] avatar Aug 03 '21 07:08 echarts-bot[bot]

Update: The problem beneath has been fixed in https://github.com/apache/echarts/pull/15313


Another related problem is that if tooltip.formatter is defined and returns null for null data, the previous data value is used, which is even more confusing.

formatter: function(param) {
      return param[0].value[1] == null ? null : 'value: ' + param[0].value[1];
}

image

Ovilia avatar Aug 03 '21 08:08 Ovilia

This issue is labeled with difficulty: easy. @tmtron Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.

Please have a look at How to debug ECharts if you'd like to give a try. 🤓

echarts-bot[bot] avatar Aug 03 '21 08:08 echarts-bot[bot]

Hi, we are facing the same issue as described by @tmtron: serie.connectNulls is set to false and lines correctly doesn't show when null values are present, but axisPointer and tolltip still show up for null values. quite confusing for the user.

Also we are building a chart with multiple lines using dataset, an thus the axisPointer and the tooltip should not show up when ALL values for that time point are nulls.

This issue is really a show-stopper issue for us, any help will be much appreciated!

DaveMDS avatar Dec 11 '22 05:12 DaveMDS

any updates on this issue?

fplusf avatar Apr 13 '23 13:04 fplusf

I got the same issue

nepton avatar Feb 06 '24 07:02 nepton