Incubator-echarts: echarts.connect is broken when a chart with multiple series is linked with a chart with single series

Created on 30 Aug 2019  ·  11Comments  ·  Source: apache/incubator-echarts

Version

4.2.1

Reproduction link

https://jsfiddle.net/3jw7xyqf/

Steps to reproduce

  1. Create a single graph with multiple series and enable legend on it

  2. Create multiple graphs with a single series

  3. Link them with echarts.connect

  4. browse the code and try to hide the first element from a graph with multiple series

What is expected?

Graphs should be connected

What is actually happening?

The first graph is disconnected


Working example:

http://twitterwatcher.com - try to hide negative tweets and observe the behaviour on the rest of the graphs.


bug en community

Most helpful comment

Provide some info about this issue:

image

image

Now the question is:
connect works based on chart.makeActionFromEvent. But connect is a common feature and use a common way to generate an action from a event. That is, current connect do not know how the charts should be connected accurately. It just use a fuzzy way to connect charts.

To solve this problem, probably their are two ways:

(1) If connect do not match the requirement of users accurately, do not use connect, but connect charts manually. That is, listen to one chart and convert the event to action parameters manually (with user customized convert logic) and call dispatchAction to the other charts.
The backwards of the way is that it probably brings lot of burden to users to listen every events the needed (for example, including highlight/downplay, updateAxisPointer, hideTip, ...)

(2) Enhance the current connect feature. Enable it to customize the chart.makeActionFromEvent by users.

(3) Any other ideas?

@Ovilia @yufeng04 @pissang @The-only

All 11 comments

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 you have posted enough image to demo your request. 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] .

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

Have a nice day! 🍵

You may need to add legend: {data: ["C"], top: '17%'} to option2. echarts.connect needs the same legend[i].name and series[i].name.

@yufeng04 - this is not fixing the issue - unfortunately.

see here: https://jsfiddle.net/hm2L6gse/

Can you be more specific on what's expected? In your demo, which series are expected to connect?

@Ovilia sure!

Current status:

  1. After de-selecting first (A) of the items from the legend on chart1
  2. The charts are disconnected - The tooltip is displayed only on chart1

Expected:

  1. After de-selecting first (A) of the items from the legend on chart1
  2. The charts are still connected - The tooltip is displayed on all of the charts

Hope that clears it up a little!

Any news on the above?

This seems to be a bug of connect.

Hi,

Is there any news with this bug?

Provide some info about this issue:

image

image

Now the question is:
connect works based on chart.makeActionFromEvent. But connect is a common feature and use a common way to generate an action from a event. That is, current connect do not know how the charts should be connected accurately. It just use a fuzzy way to connect charts.

To solve this problem, probably their are two ways:

(1) If connect do not match the requirement of users accurately, do not use connect, but connect charts manually. That is, listen to one chart and convert the event to action parameters manually (with user customized convert logic) and call dispatchAction to the other charts.
The backwards of the way is that it probably brings lot of burden to users to listen every events the needed (for example, including highlight/downplay, updateAxisPointer, hideTip, ...)

(2) Enhance the current connect feature. Enable it to customize the chart.makeActionFromEvent by users.

(3) Any other ideas?

@Ovilia @yufeng04 @pissang @The-only

Hi all!

Happy New Year!
Is there an ETA on a fix?

@pissang - you did an amazing job with summarizing it up and proposing solutions! Great job and thank you!

Hi, my project also encounters this issue, hopefully we can get a more customizable connect() api!

Was this page helpful?
0 / 5 - 0 ratings