Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Brush selection - missing most points after progressive re-render #19857

Open
ilius33 opened this issue Apr 22, 2024 · 12 comments
Open

[Bug] Brush selection - missing most points after progressive re-render #19857

ilius33 opened this issue Apr 22, 2024 · 12 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@ilius33
Copy link

ilius33 commented Apr 22, 2024

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=scatter-large&code=GYVwdgxgLglg9mABAcwKZgCIEMpYBQA26ANInMMAM6pQCUiA3gFCKJFSJYBOXiAvIjCoA7ogBiBODgDMAJgCCPLAE9C6RACpEs2gG4WbGmQr9EABn2tgcXmo4xTFxA4A8hsLucBqL_WatWdkQAD1MvAFkcAAsAOi4sMAATOABbPHotAEYLA0CjZX5cgIjomMoYMDxg-gBaItZQrTUkAFJtRAB-cxjMxAAuRBqzHozESKhY-KTU9MQvesQ8ciojAB9V83oAekRsywDuLgBtZZ8AXVNg_dZDk4pz02V9gF8DLhoQLiRD_VeIBEoHESOCwvQEaEwILwAFZUNC9Ex_mBAYhgbhZKYIdhcDC4aRsgi4AAHWAIUz-RCwKBEAYU1hQVDBKB9BaoCBRbhQSgxaxcFI4GJYRKJADCqX5lDwaNBMSIYGQE0QOwxXlRINksvQCqiSu09FVAHJEAAFOAVLkGgzPYgGKBwOAEWBE2nW232ggAIzgwVpRSIwGZiANEHQDK4BptAUQwFQOE-qF9UdY0oAWvaUi6iq9WK68hDEomAjYYKGBgaAG6oLiwCBYAgRopcGDIKKB7JWyMheTBGCUAZHBjPM6d5Td3v9wfDgwerggShRF2d1Pp_tFOkBKDKIkJoMVcqJVCWqO5gLr-lbncGvcwA9HgLZxBTm5gGD80lgAbAOvUTvUJuoPtECONcFjALAUkveQGyTSkLzLShaygMNoKTaUBmlTJOyjRJX3QcoAX7A1ggjINlANJ8k0oZQUi9AgAGUYAALx3aQsICGAGRSOjNxpRgFlYYksAgDjlAGYYABYFhPKMth2AhuDQAYoFnVAszYs9BHAy8ACEUKjTdt3gxDkLY5MQXQ9VTNRXDkXgZFCOI0gDTIiioyomiHQY5iBlYhYONQLieJ3DSBKJISRLEmJJJg6SAlktgFJ3ZSQFU48DDOJhnl0IA

Steps to Reproduce

  1. jump to minimum example
  2. enable selection tool
  3. select some points
  4. zoom with mousewheel or select another selection tool
  5. progressive re-rendering takes place

Current Behavior

After re-render only few points remain selected. From few first frames probably.
image

Expected Behavior

All points within brushed zones remain selected.

Environment

- OS:Windows 10,11
- Browser: Chrome, Edge
- Framework:

Any additional comments?

No response

@ilius33 ilius33 added the bug label Apr 22, 2024
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Apr 22, 2024
@DespotMagic
Copy link

This also happens to me even if I only have 10,000 points. After any re-rendering, only a few of the originally selected ones remain.
And re-rendering begins to occur when you zoom in/zoom out or simply even if you click on any icon of the Toolbox panel.

@helgasoft
Copy link

official example has large:true and works fine. Any reason why you want to disable optimization with large ?

@ilius33
Copy link
Author

ilius33 commented Apr 23, 2024

official example has large:true and works fine. Any reason why you want to disable optimization with large ?

Yes. The obvious reason. Brush selection doesn't work with large: true at all. I mean you can paint with brush selection tool. But with no effect. No data in event, no style changes.

@helgasoft
Copy link

helgasoft commented Apr 23, 2024

ok, agree, related to #17079 and #9945
BTW all points seem to be showing (tooltip present), but some are not highlighted.

@ilius33
Copy link
Author

ilius33 commented Apr 23, 2024

ok, agree, related to #17079 and #9945 BTW all points seem to be showing (tooltip present), but some are not highlighted.

Not highlighted and not present in event. BTW tried scatterGL and it is not supporting selection too. So basically there is no option to brushselect on large amount of data and have any perfomance option enabled.

@helgasoft
Copy link

  1. progressive re-rendering takes place

Looks like disabling progressive thru progressiveThreshold fixes the zoom problem - Demo.

So basically there is no option to brushselect on large amount of data and have any perfomance option enabled.

Agree.

@DespotMagic
Copy link

Looks like disabling progressive thru progressiveThreshold fixes the zoom problem - Demo.

It is clear that this will solve the issue. Problems initially sounded like problems with progressive rendering. In your example there are 5000 points so it works well. In my application for example we need to display up to 100,000 points (or 150,000 points) and be able to select them and zoom in/zoom out this brush area. Performance for 100 000 points with progressive rendering is satisfactory, but the fact that the selected dots disappear during Zoom - this is a blocker for us.

In my opinion this is a progressive rendering error with brush area. Because if you move the selection area even just a little, all the points are immediately selected correctly. Also if I click on "Keep selections" and select additionally some empty area, it will also correct the currently selected brush area and display all the points correctly.
So these actions trigger some internal events of ECharts that force it to render the selected area correctly. And zoom does not trigger these processes during rendering (progressive rendering).

If we can’t fix it, then at least find what event needs to be dispatched after Zoom In/Out to force ECharts to render correctly all points in the selected area and get the correct list of selected points in "brushSelected" event.

@helgasoft
Copy link

...if you move the selection area even just a little, all the points are immediately selected correctly.

@DespotMagic, frankly I cannot reproduce your findings.
What would be helpful is to update the Demo (more data, add dataZoom?) and explain the steps on how to reproduce the problem.

@DespotMagic
Copy link

@DespotMagic, frankly I cannot reproduce your findings. What would be helpful is to update the Demo (more data, add dataZoom?) and explain the steps on how to reproduce the problem.

@helgasoft thank you for trying to help) This can be easily reproduced using the example from ilius33 #19857 (comment). We are taking the same steps that ilius33 indicated. And then we just move (drag) the area with the mouse.

Steps:

  1. jump to minimum example
  2. enable selection tool
  3. select some points
  4. zoom or select another selection tool
  5. AR: only few points remain selected (current problem described in this bug)
  6. move (drag) the selected area with the mouse
  7. AR: All points within brushed zones remain selected 👌.

Example for 100,000 points on video
There you can see the problem: how the points are not rendered after Zoom. and how everything rendered corrected (all selected points) if I drag the selection area a little.

@helgasoft
Copy link

Thank you for the detailed explanation. Just step 4 might be better defined as "zoom with mouse scroll wheel".
Indeed the selection area drag is able to refresh its content successfully. So I think the zoom bug may not be that difficult to fix ...if a brave & knowledgeable volunteer has time to dive in.

@helgasoft
Copy link

helgasoft commented Apr 27, 2024

On reflection and looking from a different perspective - zoom and brush seem to be completely unrelated actions in ECharts.
As seen in the example, selected area size does not change on zoom. But it should, if zoom and brush-select were integrated!
My guess is that brush-select is pixel(canvas) based, and zoom is based on chart coordinates, so they are incompatible.
Brush-select is also an isolated, singular event and its result does not persist in further chart manipulations like pan and zoom.

@yougdlek
Copy link

@DespotMagic @helgasoft Hello, Is There any plan or stopgap to address the issue? I also face that issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

4 participants