Skip to content

Commit

Permalink
Merge pull request #113 from NIFU-NO/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sda030 authored Aug 24, 2024
2 parents 25a6578 + 83ac2ea commit 8ca6aa0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions R/fig_height_h_barchart.R
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ fig_height_h_barchart2 <- # Returns a numeric value
min = 1) {

data <- ggobj$data
if(!(inherits(data, "data.frame") && nrow(data)>0)) {
cli::cli_warn("{.arg ggobj} must be a ggplot2-object with a nrow>0 data in it. Returning {.arg min}: {.val {min}}.")
return(min)
}
indep_vars <- colnames(data)[!colnames(data) %in% .saros.env$summary_data_sort2]

if(length(indep_vars)>1) {
Expand Down
3 changes: 1 addition & 2 deletions R/make_content.cat_plot_html.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ make_content.cat_plot_html <-
drop = FALSE) +
scale_x_reorder(limits = rev, x_axis_label_width = dots$x_axis_label_width) +
ggplot2::guides(
fill = ggiraph::guide_legend_interactive(data_id = "fill.guide",
byrow = TRUE),
fill = ggiraph::guide_legend_interactive(data_id = "fill.guide"),
colour = "none"
)

Expand Down
4 changes: 2 additions & 2 deletions R/make_link.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ make_link <- function(data,
tryCatch({args$save_fn(data, path, ...)
I(paste0(args$link_prefix, path, args$link_suffix))
},
error = function(cnd) {
cli::cli_warn(c(x="Function {rlang::call_name(quote(safe_fn()))} failed with arguments {.arg path}={path}, {.arg data}={data}."),
error = function(cnd) { #={data}
cli::cli_warn(c(x="Function {rlang::call_name(quote(safe_fn()))} failed with arguments {.arg path}={path}, {.arg data} is {.obj_type_friendly {data}}."),
parent = cnd)
})
}

0 comments on commit 8ca6aa0

Please sign in to comment.