-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Legend scroll echarts #27766
base: master
Are you sure you want to change the base?
Legend scroll echarts #27766
Conversation
Hi @nelsondrew. I think the solution here would be to not scroll at all when interacting the legend. |
@michael-s-molina Then what would be the replacement for legend scroll in echarts ... as when there are excess number of legends we need the scroll... the end user needs to interact with the scroll but the problem is whenever they click a legend icon the scroll state gets reset |
@nelsondrew What I meant was not to remove the scroll but to keep the current "page" when interacting with the values instead of going to the first "page". In other words, just remove the following behavior:
In your AFTER video, you can see that the items are still moving when you select/unselect. |
@michael-s-molina Thats what i am trying to do here ... but i am unable to remove that behaviour of scroll state getting reset ... is this behaviour in any way built into echarts itself |
@nelsondrew Yes. We don't implement this behavior in Superset. |
I encouraged the involved people in Slack to file a bug report in Apache ECharts, then file one in Superset and link to the ECharts one so we can track progress on this. |
Created an echarts issue too apache/echarts#19796 |
SUMMARY
This pr was raised as an issue by a user in this slack thread -> https://apache-superset.slack.com/archives/CCKHMGRRB/p1711551298288129
This is an experimental PR on maintaining legend scroll , the problem is whenever we scroll the legend in echarts and click on a legend the list gets reset to its initial scroll position, This pr maintains the scroll state of the horizontal legend list
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
screen-capture (18).webm
After:
screen-capture (15).webm
However there are some still issues with echarts library such that it reanimates the legend list even after persisting the legend index
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION