I've currently got a reactable stored as an object in some code. I'd like to be able to convert said object into a ggplot, but no matter what I do, I get variations of the same error. The reactable is derived from a pretty simple dataframe as set up below:
df <- structure(list(Date = c("2019-02-09", "2019-02-09", "2019-02-09",
"2019-02-09", "2019-02-09", "2019-02-09", "2020-02-09", "2020-02-09",
"2020-02-09", "2020-02-09", "2021-02-09", "2021-02-09", "2021-02-09",
"2021-02-09"), Type = c("HUF", "HAD", "WOK", "STR", "HUF", "HAD",
"WOK", "STR", "HUF", "HAD", "WOK", "STR", "HUF", "HAD"), Value = c(12L,
226394L, 27566L, 217098L, 208463L, 9320L, 156607L, 19790L, 24541L,
1074419L, 17250L, 12249L, 43651L, 45121L)), class = "data.frame", row.names = c(NA,
-14L))
react_df <- reactable(df, highlight = TRUE, compact = TRUE,pagination = FALSE)
react_df
Is this possible?
EDIT: Here's the reactable that I'm looking to convert:
react_df <- reactable(df, highlight = TRUE, compact = TRUE,pagination = FALSE, columns = list(Date = colDef(name = "Last Recorded", align = 'center'), Type = colDef(name = "Category", align = 'center'), Value = colDef(name = "Change(s)", align = 'center', cell = data_bars(df, background = "white", border_width = "2px", bar_height = 3, align_bars = "left", text_position = "outside-end", max_value = 1, number_fmt = scales::percent))))
react_df