mwouts / itables

Pandas DataFrames as Interactive DataTables
https://mwouts.github.io/itables/
MIT License
740 stars 55 forks source link

Cell width fixed 41 characters #61

Closed qrun closed 2 years ago

qrun commented 2 years ago

If you have more than 41 character text in a cell, the cells well not be adjusted to the longest text in the column or the text will not be displayed in two lines in the cell. The cell will display the follwoing: a123456789b123456789b123456789c123456789d...

Sample Values a123456789b123456789b123456789c123456789d12,ZH,Africa Eastern and Southern,Aggregates,,Aggregates,Aggregates,,,

mwouts commented 2 years ago

Thank you @qrun for reporting this. Could you please share a code snippet that reproduces the problem (with a screenshot if possible)?

Also, have you tried setting a custom column width, or a custom class on the table?

mwouts commented 2 years ago

Hello @qrun , I am wondering if we could not just delete the current fixed width at 70 pixels. Could you please try the following?

import itables.options as opt

del opt.columnDefs

and tell us whether the behavior without the fixed width correspond to what you're looking for?

NB: you could also edit your itables/options.py file and remove columnsDefs there, like in this PR.

mwouts commented 2 years ago

This should be solved in itables==0.4.6 (please let me know if not)