I can't align colum data on the decimal point:
data = { {1, 45000.5, 27500.}, {2, 22500., 18333.3},
{3, 15000., 13750.}, {4, 11250., 11000.},
{5, 9000., 9166.67} }
Grid[data, {Alignment->".", Frame-> All}]
Here is a screen capture of the result as seen in the Notebook:
I tried many syntax variations for the Alignment
option. And I also tried TextGrid
instead of a plain Grid
and TableForm
alongside TableAlignements
. I never obtained a table whose values are aligned on the decimal point.
TableForm[data, TableAlignments->"."]
Grid[data, {Alignment->".", Frame-> All}]
Grid[data, {Alignment->{".","."}, Frame-> All}]
Grid[data, {Alignment->{{".","."}}, Frame-> All}]
I saw a seven-years-old question that states there is an issue with alignment to the decimal point. But as far as I understood it, this is only triggered when using ItemSize
. Not when using Alignment
only.
Explicitly using a NumberForm and Right aligning the data is kind of a workaround, but this is not entirely satisfying.
Any thoughts or suggestions to fix my issue?
It appears the issue is with the Notebook: when I export the result as an image, data are properly aligned:
How to ensure the table is properly displayed in the Notebook too?
FWIW, I'm using Wolfram Cloud in a Firefox 69.02 browser on Linux