Support AutoWidth
See original GitHub issueI’d like to have an option to have each cellwidth calculated according to the added values (never wrap), so I’d get for instance;
|subject |date |name |
|sbj |2018-01-01 |a very very very very very long name |
|another subject |2018-01-01 |shortname |
Instead of the equal distribution according to the set width.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
width - CSS: Cascading Style Sheets - MDN Web Docs
The width CSS property sets an element's width. By default, it sets the width of the content area, but if box-sizing is set...
Read more >Change the column width and row height - Microsoft Support
Select the column or columns that you want to change. On the Home tab, in the Cells group, click Format. ... Under Cell...
Read more >"column-width" | Can I use... Support tables for HTML5, CSS3 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Doesn't SVG support auto width and height for images?
The SVG 1.1 specification requires the width and height attributes for the <image> element. Most browsers today implement that, so the answer is...
Read more >Support explicit table width when autowidth option is set #519
In this case, autowidth enables automatic column sizing only. ... In addition to honoring the explicit width attribute, the converter should also ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This can be done via
AsciiTable.getRenderer().setCWC(AT_ColumnWidthCalculator)
The Behaviour you want can be achieved by using
CWC_LongestLine
I think.Note that you seem to have to set the CWC right before rendering (= after adding content).
Also see here: http://www.vandermeer.de/projects/skb/java/asciitable/examples/AT_07c_LongestLine.html
The following works:
t.getRenderer().setCWC(new CWC_LongestLine())
This project would benefit from better out-of-the-box functionality like this: I was about to dump it: but with this it is useful.