Learn R Programming

cardargus (version 0.2.1)

create_badge_row: Create a row of SVG badges with uniform height

Description

Generate multiple badges arranged horizontally with the same height.

Usage

create_badge_row(
  badges_data,
  default_color = "white",
  spacing = 4,
  font = "Jost",
  fontsize = 10,
  uniform_height = TRUE
)

Value

SVG string containing all badges

Arguments

badges_data

A list of lists, each containing label, value, and optionally color

default_color

Default color for badges

spacing

Spacing between badges

font

Font family

fontsize

Font size

uniform_height

Force all badges to have the same height (default TRUE)

Examples

Run this code
badges <- list(
  list(label = "UH", value = "192"),
  list(label = "Recurso Federal", value = "36,4 milhões"),
  list(label = "Contrapartida", value = "0,0")
)
create_badge_row(badges, default_color = "white")

Run the code above in your browser using DataLab