Skip to content

Commit

Permalink
Update geom_boxplot_interactive.R example
Browse files Browse the repository at this point in the history
changed the tooltip parameters to update "\nQ1: " and "\nQ3: " values to '.data$lower' and '.data$upper' following the label instead of displaying the minimum and maximum values.
  • Loading branch information
pacoramon authored Nov 18, 2024
1 parent 77ee766 commit 49fe2fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/geom_boxplot_interactive.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ p <- ggplot(mpg) +
tooltip = after_stat({
paste0(
"class: ", .data$fill,
"\nQ1: ", prettyNum(.data$ymin),
"\nQ3: ", prettyNum(.data$ymax),
"\nQ1: ", prettyNum(.data$lower),
"\nQ3: ", prettyNum(.data$upper),
"\nmedian: ", prettyNum(.data$middle)
)
})
Expand All @@ -40,8 +40,8 @@ p <- ggplot(mpg) +
tooltip = after_stat({
paste0(
"class: ", .data$fill,
"\nQ1: ", prettyNum(.data$ymin),
"\nQ3: ", prettyNum(.data$ymax),
"\nQ1: ", prettyNum(.data$lower),
"\nQ3: ", prettyNum(.data$upper),
"\nmedian: ", prettyNum(.data$middle)
)
}),
Expand Down

0 comments on commit 49fe2fe

Please sign in to comment.