Skip to content

Tables with a lot of columns are messy #3693

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

Closed
AbdealiLoKo opened this issue Mar 29, 2019 · 6 comments
Closed

Tables with a lot of columns are messy #3693

AbdealiLoKo opened this issue Mar 29, 2019 · 6 comments

Comments

@AbdealiLoKo
Copy link

Screen Shot 2019-03-29 at 2 40 55 PM

When trying to make a Table trace with a large number of columns that do not really fit within the viewport - it is very messy and truncates the cells in the table

@etpinard
Copy link
Contributor

Could someone try to replicate this in JS to help us debug?

@AbdealiLoKo
Copy link
Author

nums = [...new Array(100).keys()]
Plotly.newPlot(
  'graph',
  [{'cells': {'values': nums.map((x) => [1, 2, 3])},
   'header': {'values': nums.map((x) => `col${x}`)},
   'type': 'table'}],
  {});

https://codepen.io/AbdealiJK/pen/yrBeVo

@etpinard
Copy link
Contributor

etpinard commented Apr 1, 2019

Here too, what is the desired behavior in your mind?

Should we add an horizontal scroll bar? Should we hide text labels that don't fit in their cells?

@AbdealiLoKo
Copy link
Author

This one's a bit more difficult to answer. Cause I can see merits in the current behavior for smaller number of columns...
I think we should list down the different kind of usecases a Table could have and ensure we have the ability to do each.

  • Scenario 1 - Table with 2 columns, want to take the entire width available to show these 2 columns
  • Scenario 2 - Table with 100 columns, want to scroll automatically for the columns to be visible - with all text visible
  • Scenario 3 - Table with 100 columns, want to scroll automatically for the columns to be visible - with a max-width for the columns so 1 column doesn't get too long (and wrap text or truncate text)

I think these are the scenarios I'm trying to implement when using the table. First is the current behavior. Second and Third I'm not super sure how to do and am doing weird hacks

@etpinard
Copy link
Contributor

etpinard commented Jul 4, 2019

Related: #2056

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants