|
1 | 1 | # 4.8.0.9000 |
2 | 2 |
|
| 3 | +## Changes to plotly.js |
| 4 | + |
| 5 | +* This version of the R package upgrades the version of the underlying plotly.js library from v1.42.3 to v1.46.1. The [plotly.js release page](https://github.com/plotly/plotly.js/releases) has the full list of changes, but here is summary most pertainent ones for the R package: |
| 6 | + * New trace types: `sunburst`, `waterfall`, `isosurface`. |
| 7 | + * New `hovertemplate` attribute allows for finer-tuned control over tooltip text. See [here](https://plotly-r.com/controlling-tooltips.html#fig:tooltip-format-heatmap) for an example. |
| 8 | + * Providing a string to `title` is now deprecated (but still works). Instead, use `title = list(text = "title")`. This change was made to support a new title placement API (e.g., `title = list(text = "title", xanchor = "left")`). Note that these changes are relevant for `layout.title` as well as `layout.xaxis.title`/`layout.yaxis.title`/etc. |
| 9 | + |
3 | 10 | ## NEW FEATURES & IMPROVEMENTS |
4 | 11 |
|
5 | | -* Upgraded to plotly.js v1.42.5. |
6 | 12 | * Several new features and improvements related to accessing plotly.js events in shiny (learn more about them in this RStudio [webinar](https://resources.rstudio.com/webinars/accessing-and-responding-to-plotly-events-in-shiny-carson-sievert)): |
7 | 13 | * The `event` argument of the `event_data()` function now supports the following events: `plotly_selecting`, `plotly_brushed`, `plotly_brushing`, `plotly_restyle`, `plotly_legendclick`, `plotly_legenddoubleclick`, `plotly_clickannotation`, `plotly_afterplot`, `plotly_doubleclick`, `plotly_deselect`, `plotly_unhover`. For examples, see `plotly_example("shiny", "event_data")`, `plotly_example("shiny", "event_data_legends")`, and `plotly_example("shiny", "event_data_annotation")`, |
8 | 14 | * New `event_register()` and `event_unregister()` functions for declaring which events to transmit over the wire (i.e., from the browser to the shiny server). Events that are likely to have large overhead are not registered by default, so you'll need to register these: `plotly_selecting`, `plotly_unhover`, `plotly_restyle`, `plotly_legendclick`, and `plotly_legenddoubleclick`. |
|
14 | 20 | * The `orca()` function now supports conversion of much larger figures (#1322) and works without a mapbox api token (#1314). |
15 | 21 | * The `orca_serve()` function was added for efficient exporting of many plotly graphs. For examples, see `help(orca_serve)`. |
16 | 22 | * The `orca()` function gains new arguments `more_args` and `...` for finer control over the underlying system commands. |
17 | | - |
| 23 | + |
| 24 | +* `ggplotly()` now respects horizontal alignment of **ggplot2** titles (e.g., `ggplotly(qplot(1:10) + ggtitle("A title") + theme(plot.title = element_text(hjust = 1)))`). |
18 | 25 | * **plotly** objects can now be serialized and unserialized in different environments (i.e., you can now use `saveRDS()` to save an object as an rds file and restore it on another machine with `readRDS()`). Note this object is *dynamically* linked to JavaScript libraries, so one should take care to use consistent versions of **plotly** when serializing and unserializing (#1376). |
19 | 26 | * The `style()` function now supports "partial updates" (i.e. modification of a particular property of an object, rather than the entire object). For example, notice how the first plot retains the original marker shape (a square): `p <- plot_ly(x = 1:10, y = 1:10, symbol = I(15)); subplot(style(p, marker.color = "red"), style(p, marker = list(color = "red")))` (#1342). |
20 | 27 | * The `method` argument of `plotlyProxyInvoke()` gains support for a `"reconfig"` method. This makes it possible to modify just the configuration of a plot in a **shiny** app. For an example use, see `plotly_example("shiny", "event_data_annotation")`. |
21 | 28 | * The `plotly_example()` function will now attempt to open the source file(s) used to run the example. Set `edit = FALSE` to prevent the source file(s) from opening. |
| 29 | +* An informative warning is now thrown if invalid argument names are supplied to `config()`. |
22 | 30 |
|
23 | 31 | ## CHANGES |
24 | 32 |
|
25 | | -* The 'collaborate' button no longer appears in the modebar, and as a result, the `config()` function no longer has a `collaborate` argument. |
| 33 | +* If `stroke` is specified, `span` now defaults to `I(1)`. This results in a slightly narrower default span for some trace types (e.g., `box`, `contour`), but it also ensures the `stroke` is always visible when it's relevant (e.g. `plot_ly(x = 1:10, y = 1:10, stroke = I("black"))`), making for a more consistent overall default (#1507). |
| 34 | +* The 'collaborate' button no longer appears in the modebar, and is longer supported, so the `config()` function no longer has a `collaborate` argument. |
| 35 | +* The `cloud` argument is now deprecated and will be removed in a future version. Use `showSendToCloud` instead. |
| 36 | +* `ggplotly()` now translates title information to `layout.title.text` (instead of `layout.title`) and `layout.title.font` (instead of `layout.titlefont`) |
26 | 37 |
|
27 | 38 | ## BUG FIXES |
28 | 39 |
|
29 | 40 | * `subplot()` now works much better with annotations, images, and shapes: |
30 | 41 | - When `xref`/`yref` references an x/y axis these references are bumped accordingly (#1181). |
31 | 42 | - When `xref`/`yref` references paper coordinates, these coordinates are updated accordingly (#1332). |
| 43 | +* `subplot()` now repositions shapes with fixed height/width (i.e., `xsizemode`/`ysizemode` of `"pixel"`) correctly (#1494). |
32 | 44 | * The colorscale generated via the `color` argument in `plot_ly()` now uses an evenly spaced grid of values instead of quantiles (#1308). |
33 | 45 | * When using **shinytest** to test a **shiny** that contains **plotly** graph, false positive differences are no longer reported (rstudio/shinytest#174). |
34 | 46 | * When the `size` argument maps to `marker.size`, it now converts to an array of appropriate length (#1479). |
|
41 | 53 | * Recursive attribute validation is now only performed on recursive objects (#1315). |
42 | 54 | * The `text` attribute is no longer collapsed to a string when `hoveron='fills+points'` (#1448). |
43 | 55 | * `layout.[x-y]axis.domain` is no longer supplied a default when `layout.grid` is specified (#1427). |
| 56 | +* When uploading charts to a plot.ly account via `api_create()`, layout attributes are no longer incorrectly src-ified, which was causing inconsistencies in local/remote rendering of `ggplotly()` charts (#1197). |
44 | 57 |
|
45 | 58 | # 4.8.0 |
46 | 59 |
|
|
0 commit comments