Skip to content

Commit 57bb3a1

Browse files
authored
fix(renderPlot): get interactive plotting working with ggplot2 v4.0 (#4228)
* fix(renderPlot): get interactive plotting working with ggplot2 v4.0 * Update NEWS.md
1 parent 219fbc6 commit 57bb3a1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
* `ExtendedTask` now catches synchronous values and errors and returns them via `$result()`. Previously, the extended task function was required to always return a promise. This change makes it easier to use `ExtendedTask` with a function that may return early or do some synchronous work before returning a promise. (#4225)
2727

28-
* Updated a test for compatibility with ggplot2 4.0.0. (#4226)
28+
* `renderPlot()` was updated to accomodate changes in ggplot2 v4.0.0. (#4226)
2929

3030
## Bug fixes
3131

R/render-plot.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ drawPlot <- function(name, session, func, width, height, alt, pixelratio, res, .
266266
# addition to ggplot, and there's a print method for that class, that we
267267
# won't override that method. https://github.com/rstudio/shiny/issues/841
268268
print.ggplot <- custom_print.ggplot
269+
# For compatibility with ggplot2 >v4.0.0
270+
`print.ggplot2::ggplot` <- custom_print.ggplot
269271

270272
# Use capture.output to squelch printing to the actual console; we
271273
# are only interested in plot output

0 commit comments

Comments
 (0)