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

Line chart legend resets to the first page when clicking a dimension on another page. #32387

Open
3 tasks done
iercan opened this issue Feb 26, 2025 · 1 comment
Open
3 tasks done
Labels
viz:charts:line Related to the Line chart

Comments

@iercan
Copy link
Contributor

iercan commented Feb 26, 2025

Bug description

When dimensions of line chart spans multiple pages, selecting an item from another page redirects me to the first page, regardless of whether the orientation is top or left. See the video below.

Screenshots/recordings

output.mp4

Superset version

4.1.1

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Feb 26, 2025

The issue you're experiencing, where the line chart legend resets to the first page when selecting a dimension on another page, seems to be related to how the legend state is managed in the Superset line chart component. Unfortunately, I couldn't find specific information in the repository about the logic behind resetting the legend to the first page or how pagination is implemented in the legend.

However, the event handlers legendselectchanged, legendselectall, and legendinverseselect are triggered when a dimension is selected in the legend. These handlers call the onLegendStateChanged function with the payload.selected parameter, which might be related to the behavior you're observing [1].

To address this issue, you might want to investigate how the onLegendStateChanged function is implemented and whether it affects the pagination state. Additionally, reviewing the component's state management logic, particularly how it handles legend interactions, could provide insights into why the legend resets to the first page.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the viz:charts:line Related to the Line chart label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz:charts:line Related to the Line chart
Projects
None yet
Development

No branches or pull requests

1 participant