great-tables
great-tables copied to clipboard
docs: add an example demonstrating `define_units()` usage
Hello team,
As we know, define_units()
powers GT.fmt_units()
behind the scenes, but it seems to lack a clear example for users to quickly grasp its usage.
I’d like to propose an example that demonstrates how to use define_units()
to render a string with unit annotations as a subtitle in the table header. This example highlights that define_units()
can be used independently and within components that don’t yet support unit annotations (such as the table header).
Below is the final table for reference.