You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "iercan (via GitHub)" <gi...@apache.org> on 2025/06/24 11:59:42 UTC

[I] Chart and legend overlap [superset]

iercan opened a new issue, #33880:
URL: https://github.com/apache/superset/issues/33880

   ### Bug description
   
   Excessive legend values in charts cause overlaps with the chart itself. This issue affects all ECharts, regardless of the Superset version. With old line charts being removed in version 5.0.0, we have no alternative. We’d appreciate your help in resolving this. Thank you.
   
   Old line chart 
   
   ![Image](https://github.com/user-attachments/assets/7eb46eb6-3472-4c09-a838-71eeb0846c15)
   
   This is how it looks with new echarts.
   
   ![Image](https://github.com/user-attachments/assets/9f224c3c-4682-46f4-ae37-0a3db30a34ed)
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [x] 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.


-- 
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-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33880:
URL: https://github.com/apache/superset/issues/33880#issuecomment-3495215098

   Hi there @alex241728! Sorry I didn't see this in a more timely manner. By all means, we're open to options/solutions, but scrolling does seem like one easy option. This could be AI slop, but it suggests you can control scrolling in echarts like so:
   ```
   option = {
       legend: {
           type: 'scroll', // Set type to 'scroll'
           orient: 'vertical', // Or 'horizontal'
           right: 10,
           top: 20,
           bottom: 20,
           // You might need to specify the data array here as well if not already in series
       },
       // ... other options
   };
   ```
   It might be nice to make a reusable control for all ECharts to let chart builders select the scroll direction, max legend size, etc., but I'm open to just having a sensible defaults for maximum dimensions and scroll direction. 


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "alex241728 (via GitHub)" <gi...@apache.org>.
alex241728 commented on issue #33880:
URL: https://github.com/apache/superset/issues/33880#issuecomment-3354278970

   @rusackas  Hello Evan, Wuthering-Waves group from the course CSCD01H3 in Fall is planning to solve this issue. Can we further discuss the solutions to this problem? You just mentioned scrolling of legend. Do you want our team to implement it? I think there may be other ways, such as resizing the legend, but I am not sure if it is implementable with ECharts. Could you provide us with some ideas? We are still getting familar with ECharts library. Looking forward to your responses!


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33880:
URL: https://github.com/apache/superset/issues/33880#issuecomment-3002088277

   Similar to the bot, I was going to suggest enabling scrolling (and perhaps pagination, if relevant) on legends. Open to other suggestions. I feel like just squeezing the chart down isn't a great alternative, is a giant set of legends could reduce the chart to uselessness.
   
   CC @kasiazjc for input.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33880:
URL: https://github.com/apache/superset/issues/33880#issuecomment-3000059972

   <!-- Answer -->
   There isn't a built-in Superset UI control to prevent legend overlap in ECharts when there are many legend entries. However, the ECharts plugin in Superset does support advanced legend configuration, including scrolling, via the chart options. The relevant code shows that legend properties like `legendType`, `legendOrientation`, and `scrollDataIndex` are passed to ECharts, and the helper `getLegendProps` manages legend display and scrolling logic. This means you can potentially enable legend scrolling (which prevents overlap) by setting `legend.type: 'scroll'` in the chart's custom JSON configuration if your chart type and Superset deployment expose this option. See the legend configuration logic [here](https://github.com/apache/superset/blob/98b35125c2a562bb2a61a26e6acd3430339320aa/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts).
   
   Recent pull requests have improved legend pagination and usability for long legends, but they do not directly solve the overlap when the legend is too large for the chart area—scrolling or truncation must be enabled via configuration if available in your chart controls [PR #33779](https://github.com/apache/superset/pull/33779) [PR #33728](https://github.com/apache/superset/pull/33728).
   
   If your chart's control panel does not expose legend scrolling, you may need to use the "Customize" or "Advanced" section to inject custom ECharts JSON, or request this as a feature for your deployment. There are no existing tickets or documentation that directly address this issue.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2f5f7d23-be2e-437d-80af-e99c60204537?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33880)


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "YousufFFFF (via GitHub)" <gi...@apache.org>.
YousufFFFF commented on issue #33880:
URL: https://github.com/apache/superset/issues/33880#issuecomment-3584813568

   Hi! I'd like to work on this issue.
   
   I recently added the timeseries x-axis ordering fix in PR #36214, and this looks like a good next step. I'll reproduce the chart + legend overlap and then adjust the ECharts legend/grid layout so the chart area does not get covered.
   
   Thanks!
   


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "iercan (via GitHub)" <gi...@apache.org>.
iercan commented on issue #33880:
URL: https://github.com/apache/superset/issues/33880#issuecomment-3003340396

   We just want it to work the same way old charts work. We don't want to turn it into scrolling.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Chart and legend overlap [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #33880: Chart and legend overlap
URL: https://github.com/apache/superset/issues/33880


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org