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).