Takes an existing gt
table and converts a column of integers
into various types of up/down arrows. Note that you need to specify a palette
of three colors, in the order of up, neutral, down. Defaults to green, grey,
purple. There are 6 supported fa_type
, representing various arrows.
Note that you can use font_color = 'match'
to match the palette across
arrows and text. show_text = FALSE
will remove the text from the column,
resulting only in colored arrows.
Arguments
- gt_object
An existing
gt
table object- column
The single column that you would like to convert to rank change indicators.
- palette
A character vector of length 3. Colors can be represented as hex values or named colors. Colors should be in the order of up-arrow, no-change, down-arrow, defaults to green, grey, purple.
- fa_type
The name of the Fontawesome icon, limited to 5 types of various arrows, one of
c("angles", "arrow", "turn", "chevron", "caret")
- font_color
A string, indicating the color of the font, can also be returned as
'match'
to match the font color to the arrow palette.- show_text
A logical indicating whether to show/hide the values in the column.
See also
Other Utilities:
add_text_img()
,
fa_icon_repeat()
,
fmt_pad_num()
,
fmt_pct_extra()
,
fmt_symbol_first()
,
generate_df()
,
gt_add_divider()
,
gt_badge()
,
gt_double_table()
,
gt_duplicate_column()
,
gt_fa_column()
,
gt_fa_rating()
,
gt_fa_repeats()
,
gt_highlight_cols()
,
gt_highlight_rows()
,
gt_img_border()
,
gt_img_circle()
,
gt_img_multi_rows()
,
gt_img_rows()
,
gt_index()
,
gt_merge_stack_color()
,
gt_merge_stack()
,
gt_two_column_layout()
,
gtsave_extra()
,
img_header()
,
pad_fn()
,
tab_style_by_grp()