Incubator-superset: Min bar width for NVD3 charts not maintained on chart with few columns.

Created on 29 Apr 2019  路  4Comments  路  Source: apache/incubator-superset

Bar Chart column width can become unusable when resizing browser. Long x-axis names exacerbates the issue. The issue appears to be tied to the number of columns in the bar chart and the allotted chart width. To try and limit the ui issues the screen shots below make use of a change to truncate the long x-axis names: https://github.com/apache-superset/superset-ui-plugins/pull/21

This issue seems similar: https://github.com/apache/incubator-superset/pull/629

Expected results

Minimum bar width maintained

Actual results

Bar Chart columns squished

Screenshots

Bar Chart with few columns, squished down vs Bar Chart with more columns that overflow outside the container.

bar chart column width

How to reproduce the bug

  1. Create a Dashboard with two bar charts, one with few columns, one with many columns.
  2. Choose a chart width that is small, ex: chart position json meta width = 3
  3. Resize (decreasing) browser window to see the chart render smaller and smaller column width until they are unusable on the chart with few columns. While the chart with many columns overflows

Environment

  • superset version: [v0.999.0dev, master]

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar. Added links to related issues or fixes but they differ or do not fix the issue related to the number of x-axis columns.
#bug inactive

Most helpful comment

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 4 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Is there a way to get around this issue?
Also is it possible to set a max width when number of bars are fever or only one or two - either with horizontal or vertical bar charts

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Was this page helpful?
0 / 5 - 0 ratings