Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# 4.9.4.9000

## Changes to plotly.js
## 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.2.1. This includes many breaking changes, bug fixes, and improvements to the underlying JavaScript library. The [plotly.js release page](https://github.com/plotly/plotly.js/releases) has the full list of changes.

## Breaking changes
## Breaking changes in R API

* `ggplotly()` now uses the `layout.legend.title` (instead of `layout.annotations`) plotly.js API to convert guides for discrete scales. (#1961)
* `renderPlotly()` now uses `Plotly.react()` (instead of `Plotly.newPlot()`) to redraw when `layout(transition = )` is specified. This makes it possible/easier to implement a smooth transitions when `renderPlotly()` gets re-executed. (#2001)

## New Features

Expand Down
4 changes: 4 additions & 0 deletions inst/htmlwidgets/plotly.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ HTMLWidgets.widget({
var plot = Plotly.newPlot(graphDiv, x);
instance.plotly = true;

} else if (x.layout.transition) {

var plot = Plotly.react(graphDiv, x);

} else {

// this is essentially equivalent to Plotly.newPlot(), but avoids creating
Expand Down