great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

docs: add an example demonstrating `define_units()` usage

Open jrycw opened this issue 5 months ago • 5 comments

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. image

jrycw avatar Sep 17 '24 10:09 jrycw