superset icon indicating copy to clipboard operation
superset copied to clipboard

Heatmap: X Axis Labels Overlap / No Option to Rotate Labels

Open yousoph opened this issue 1 year ago • 7 comments
trafficstars

Bug description

On the legacy heatmap, the x axis labels would be at an angle to not overlap. On the new ECharts Heatmap, the labels overlap (see screenshots below)

How to reproduce the bug

  1. Create a Heatmap chart with the new ECharts Heatmap with a dataset with longer labels
  2. (Optional) Add the chart to a dashboard and adjust the width to see the chart overlaps)

Screenshots/recordings

On the same dashboard with the same width:

Legacy Heatmap: image

New Heatmap: image

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.

yousoph avatar Jul 31 '24 21:07 yousoph

@michael-s-molina I don't think the Legacy heatmap had a control to change the labels, I believe they just adjusted automatically. Do you know if that would be possible with the new heatmap as well?

yousoph avatar Jul 31 '24 21:07 yousoph

@yousoph I'm not sure if ECharts offers the same behavior out of the box but I'm sure it could be implemented or at least use a different strategy such as hiding overlapped labels.

michael-s-molina avatar Aug 01 '24 11:08 michael-s-molina

ECharts definitely offers rotation, but I'm not sure if it supports automatic rotation.

rusackas avatar Aug 01 '24 17:08 rusackas

Need an option to rotate the x-axis label.

alberk8 avatar Dec 10 '24 10:12 alberk8

Is there any way to rotate the x-lable using CSS or JSON metadata @michael-s-molina @rusackas ? I'm struggling with this issue

bluespring2812 avatar Mar 13 '25 03:03 bluespring2812

I don't think so, but we'd be open to a PR adding a control input for rotating the labels (other charts already support this)

rusackas avatar Mar 19 '25 17:03 rusackas

Anyone here is welcome to open a PR, but this one seems otherwise at risk of becoming inactive/not-planned.

rusackas avatar Jun 11 '25 18:06 rusackas

Thank you @SBIN2010 !!

@rusackas , could you check the PR https://github.com/apache/superset/pull/34239 ? Seems a quite straightforward modification :smile:

alesnav avatar Aug 07 '25 17:08 alesnav