-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Automatic format of number types #29
Comments
hi @michalfita , but ConsoleTableExt also has a feature which give us define which columns we want to align using .WithTextAlignment(new Dictionary<int, TextAligntment>{
{ 1, TextAligntment.Right },
{ 3, TextAligntment.Center}
}) In above example, 1 and 3 are column indexs Same, you can align header with extension .WithHeaderTextAlignment(new Dictionary<int, TextAligntment> {
{1, TextAligntment.Center }
}) Check more in example project here https://github.com/minhhungit/ConsoleTableExt/tree/master/Src/ConsoleTableApp |
I'm aware of this feature, however this require really going extra mile in comparison to ConsoleTables if you want to stick with simple |
Support the feature is not too hard, but we will need to check every values in the table to verify if value is a "number" or not, this will cause a performance problem, it can be slower for large table. Anyway, I will consider to support it, I admit that defining text align by column index is quite bored |
The ConsoleTables has a nice feature, where
.Configure(o => o.NumberAlignment = Alignment.Right)
sets up automatic right alignment of numbers in the table.Would you consider adding similar mechanism to your project?
The text was updated successfully, but these errors were encountered: