dosubot[bot] commented on issue #32387: URL: https://github.com/apache/superset/issues/32387#issuecomment-2684156517
<!-- Answer --> 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 <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx)</sup>. 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. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3c42595b-73ef-4ef6-9ab7-9167154d930d?feedback_type=other)</sup> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org