If all values for a single nanoplot are integerlike, the displayed values should not contain decimal values filled with zeroes. The problem can be seen in the example page at https://posit-dev.github.io/great-tables/get-started/nanoplots.html. Here's a screenshot showing the issue:
All values in the bottom plot don't have non-zero decimal parts (they are parsed from the string: "2 0 15 7 8 10 1 24 17 13 6") so the third value should display as 15 and not 15.0.
When numbers are autoformatted for nanoplots, the aim is to have the most compact and consistent display (and the user could provide a function for formatting as a customization). So, removing unnecessary digits makes sense here.
If all values for a single nanoplot are integerlike, the displayed values should not contain decimal values filled with zeroes. The problem can be seen in the example page at https://posit-dev.github.io/great-tables/get-started/nanoplots.html. Here's a screenshot showing the issue:
All values in the bottom plot don't have non-zero decimal parts (they are parsed from the string:
"2 0 15 7 8 10 1 24 17 13 6"
) so the third value should display as15
and not15.0
.When numbers are autoformatted for nanoplots, the aim is to have the most compact and consistent display (and the user could provide a function for formatting as a customization). So, removing unnecessary digits makes sense here.