Releases: plotly/plotly.R
plotly 4.10.4
Improvements
ggplotly()
now works better with the development version of ggplot2 (> v3.4.4). (#2315)
plotly 4.10.3
Improvements
ggplotly()
now works better with the development version of ggplot2 (> v3.4.3). (#2301)
Bug fixes
-
Closed #1947:
ggplotly()
now correctly handlesgeom_vline
/geom_hline
with empty data. Previously, ifgeom_vline
/geom_hline
was passed an empty data frame, it would result in an error. The plot is drawn even if no lines are found; this is the same behavior asggplot2
. -
Closed #1214: Do not warn in RStudio on Windows when scattergl is used. Recent RStudio versions can render scattergl correctly.
-
Closed #2298: Fix fill assignment in geom_point when a single shape value was used with multiple fill and colour values mapped (@zeehio)
plotly 4.10.2
New features
- Closed #2216: Additional selectize.js options can now be passed along to
highlight()
'sselectize
argument. (#2217)
Improvements
Bug fixes
- Closed #2212:
ggplotly()
no longer silently drops legends that are customized throughggplot2::guide_legend()
. - Closed #2179:
save_image()
no longer needsreticulate::py_run_string("import sys")
in order to run without error. (#2179) - Closed #2218:
highlight(selectize = TRUE)
no longer yields an incorrect selectize.js result when there is a combination of crosstalk and non-crosstalk traces. (#2217) - Closed #2208:
ggplotly()
no longer errors given ageom_area()
with 1 or less data points (error introduced by new behavior in ggplot2 v3.4.0). (#2209) - Closed #2220:
ggplotly()
no longer errors onstat_summary(geom = "crossbar")
. (#2222) - Closed #2212:
ggplotly()
no longer removes legends when setting guide properties viaguides(aes = guide_xxx(...))
.
plotly 4.10.1
Changes to plotly.js
- This version of the R package upgrades the version of the underlying plotly.js library from v2.5.1 to v2.11.1. This includes many bug fixes and improvements. The plotly.js release page has the full list of changes.
New features
plotlyOutput()
gains a newfill
parameter. WhenTRUE
(the default), the widget's container element is allowed to grow/shrink to fit it's parent container so long as that parent is opinionated about its height and has been marked withhtmltools::bindFillRole(x, container = TRUE)
. (#2198)- The primary motivation for this is to allow plots to grow/shrink by default inside
bslib::card_body_fill()
- The primary motivation for this is to allow plots to grow/shrink by default inside
ggplotly()
now supports the{ggalluvial}
package. (#2061, thanks @moutikabdessabour)highlight()
now supportson="plotly_selecting"
, enabling client-side linked brushing via mouse click+drag (no mouse-up event required, as withon="plotly_selected"
). (#1280)raster2uri()
supports nativeRaster objects. This enables nativeRaster support for
theannotation_raster()
geom (#2174, @zeehio).
Bug fixes
ggplotly()
now convertsstat_ecdf()
properly. (#2065)ggplotly()
now correctly handlesgeom_tile()
with nofill
aesthetic. (#2063)ggplotly()
now respectsguide(aes = "none")
(e.g.,guide(fill = "none")
) when constructing legend entries. (#2067)- Fixed an issue with translating
GGally::ggcorr()
viaggplotly()
. (#2012) - Fixed an issue where clearing a crosstalk filter would raise an error in the JS console (#2087)
- Fixed an issue where
map_color()
would throw an error on R 4.2 (#2131)
Improvements
ggplotly()
does not issue warnings withoptions(warnPartialMatchArgs = TRUE)
any longer. (#2046, thanks @bersbersbers)ggplotly()
does not issue warnings related to use of deprecatedtidyr::gather_()
in internals. (#2125, thanks @simonpcouch)
plotly 4.10.0
Breaking changes in JavaScript API
- This version of the R package upgrades the version of the underlying plotly.js library from v1.57.1 to v2.5.1. This includes many breaking changes, bug fixes, and improvements to the underlying JavaScript library. Most of the breaking changes are summarized in this announcement of the 2.0 release, but see here for the full changelog.
Breaking changes in R API
ggplotly()
now uses thelayout.legend.title
(instead oflayout.annotations
) plotly.js API to convert guides for discrete scales. (#1961)renderPlotly()
now usesPlotly.react()
(instead ofPlotly.newPlot()
) to redraw whenlayout(transition = )
is specified. This makes it possible/easier to implement a smooth transitions whenrenderPlotly()
gets re-executed. (#2001)
New Features
- Added new functions for static image exporting via the kaleido python package, namely
save_image()
andkaleido()
. Seehelp(save_image, package = "plotly")
for installation info and example usage. (#1971)
Improvements
ggplotly()
now better positions axis titles forfacet_wrap()
/facet_grid()
. (#1975)
plotly 4.9.4.1
- Fixes a bug in
ggplotly()
with{crosstalk}
and{ggplot2}
v3.3.4 (#1952).
plotly 4.9.4
BUG FIXES
- Duplicate
highlight(selectize=T)
dropdowns are no longer rendered in Shiny (#1936). group_by.plotly()
now properly retains crosstalk information across{dplyr}
versions (#1920).- Adds fixes in
ggplotly()
for the upcoming{ggplot2}
>3.3.3 release (#1952). - Fixes some issues with
name
andframes
when both attributes are specified. (#1903 and #1618).
plotly 4.9.3
Changes to plotly.js
- This version of the R package upgrades the version of the underlying plotly.js library from v1.52.2 to v1.57.1. This includes many bug fixes and improvements. The plotly.js release page has the full list of changes.
NEW FEATURES
-
renderPlotly()
now works well withshiny::bindCache()
, meaning that plotly graphs can now be persistently cached in Shiny apps withrenderPlotly(expr) %>% shiny::bindCache()
(#1879). -
ggplotly()
now works well with the thematic package. That is, it can now correctly translate ggplot2 styling that derives from thematic. Note that, in order to use thematic's auto theming in Shiny withggplotly()
, you need shiny v1.5.0 (or higher) and htmlwidgets v1.5.2.9000 (or higher). Relatedly, if these versions are available, one may now also callgetCurrentOutputInfo()
insiderenderPlotly()
to get CSS styles of the output container (#1801 and #1802).
IMPROVEMENTS
-
All HTTP requests are now retried upon failure (#1656, @jameslamb).
-
R linebreaks (
\n
) in factor labels are now translated to HTML linebreaks (<br />
), too. Before, this conversion was only done for colums of type character. (#1700, @salim-b).
BUG FIXES
-
When R's
POSIXt
class is serialized to JSON, the time of day is now correctly preserved (in plotly.js expected'yyyy-mm-dd HH:MM:SS.ssssss'
format). This should fix a whole host of issues where date-times were being rounded. (#1871, @FlukeAndFeather). -
ggplotly()
now handles discrete axes of afacet_wrap
andfacet_grid
correctly when there is only one category in panels > 1 (#1577 and #1720). -
ggplotly()
now correctly accounts for linebreaks in tick label text when computing plot margins (#1791, @trekonom). -
ggplotly()
now handleselement_blank()
andfactor()
labels in positional scales correctly (#1731 and #1772). -
ggplotly()
now handles missingy
aesthetic ingeom_errorbar()
(#1779, @trekonom).
plotly 4.9.2
Changes to plotly.js
- This version of the R package upgrades the version of the underlying plotly.js library from v1.49.4 to v1.52.2. This includes many bug fixes, improvements, as well as 2 new trace types:
treemap
andimage
. The plotly.js release page has the full list of changes.
IMPROVEMENTS
- The
add_image()
function was added to make it easier to create image traces viaraster
objects.
BUG FIXES
plotly 4.9.1
Changes to plotly.js
- This version of the R package upgrades the version of the underlying plotly.js library from v1.46.1 to v1.49.4. The plotly.js release page has the full list of changes.
IMPROVEMENTS
event_data()
gains support for theplotly_sunburstclick
event (#1648)
BUG FIXES
- Fixed an issue with correctly capturing the return value of user-expressions to
renderPlotly()
(#1528). - Fixed a resizing issue where graphs could be incorrectly resized to their initial size in some cases (#1553).
ggplotly()
now positions the x-axis in the last column of afacet_wrap()
properly (#1501).ggplotly()
now handlesgeom_hline()
/geom_vline()
correctly in conjunction withcoord_flip()
(#1519).event_data()
now correctly relays thekey
attribute for statistical traces (#1610).