These functions allow programmatic manipulation of CSS classes
on SVG elements within a girafe output in Shiny applications.
Elements are targeted by their data-id, key-id, or theme-id
attributes.
Usage
girafe_class_add(
session,
id,
class,
data_id = NULL,
key_id = NULL,
theme_id = NULL
)
girafe_class_remove(
session,
id,
class,
data_id = NULL,
key_id = NULL,
theme_id = NULL
)
girafe_class_toggle(
session,
id,
class,
data_id = NULL,
key_id = NULL,
theme_id = NULL
)Arguments
- session
The Shiny session object.
- id
The output id of the girafe element (the
outputIdused ingirafeOutput()).- class
A non-empty character string of CSS class names to add, remove, or toggle.
- data_id
A character vector of
data-idvalues identifying the target elements.- key_id
A character vector of
key-idvalues identifying the target elements.- theme_id
A character vector of
theme-idvalues identifying the target elements.