Skip to content

version changes for v5.10.0 #3825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 11, 2022
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## UNRELEASED
## [5.10.0] - 2022-08-11

### Updated
- Updated Plotly.js to from version 2.12.1 to version 2.13.3. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2133----2022-07-25) for more information. Notable changes include:
- Updated Plotly.js to from version 2.12.1 to version 2.14.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2140----2022-08-10) for more information. Notable changes include:
- Add support for `sankey` links with arrows
- Add `selections`, `newselection` and `activeselection` layout attributes to have persistent and editable selections over cartesian subplots
- Add `unselected.line.color` and `unselected.line.opacity` options to `parcoords` trace
- Display Plotly's new logo in the modebar
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

## Quickstart

`pip install plotly==5.9.0`
`pip install plotly==5.10.0`

Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):

Expand Down Expand Up @@ -78,13 +78,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
plotly.py may be installed using pip...

```
pip install plotly==5.9.0
pip install plotly==5.10.0
```

or conda.

```
conda install -c plotly plotly=5.9.0
conda install -c plotly plotly=5.10.0
```

### JupyterLab Support
Expand All @@ -106,7 +106,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**,

```
# JupyterLab 2.x renderer support
jupyter labextension install jupyterlab-plotly@5.9.0 @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyterlab-plotly@5.10.0 @jupyter-widgets/jupyterlab-manager
```

Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
Expand Down
39 changes: 15 additions & 24 deletions packages/javascript/jupyterlab-plotly/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/javascript/jupyterlab-plotly/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyterlab-plotly",
"version": "5.9.0",
"version": "5.10.0",
"description": "The plotly Jupyter extension",
"author": "The plotly.py team",
"license": "MIT",
Expand Down Expand Up @@ -65,7 +65,7 @@
"@lumino/messaging": "^1.2.3",
"@lumino/widgets": "^1.8.1",
"lodash": "^4.17.4",
"plotly.js": "^2.13.3"
"plotly.js": "^2.14.0"
},
"jupyterlab": {
"extension": "lib/jupyterlab-plugin",
Expand Down
1 change: 1 addition & 0 deletions packages/javascript/jupyterlab-plotly/src/Figure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ export class FigureView extends DOMWidgetView {
var initialTraces = _.cloneDeep(this.model.get("_data"));
var initialLayout = _.cloneDeep(this.model.get("_layout"));
var config = this.model.get("_config");
config.editSelection = false;

Plotly.newPlot(that.el, initialTraces, initialLayout, config).then(
function () {
Expand Down
12 changes: 12 additions & 0 deletions packages/python/plotly/codegen/resources/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@
"valType": "boolean"
}
},
"editSelection": {
"description": "Enables moving selections.",
"dflt": true,
"valType": "boolean"
},
"fillFrame": {
"description": "When `layout.autosize` is turned on, determines whether the graph fills the container (the default) or the screen (if set to *true*).",
"dflt": false,
Expand Down Expand Up @@ -42051,6 +42056,13 @@
"valType": "number"
},
"link": {
"arrowlen": {
"description": "Sets the length (in px) of the links arrow, if 0 no arrow will be drawn.",
"dflt": 0,
"editType": "calc",
"min": 0,
"valType": "number"
},
"color": {
"arrayOk": true,
"description": "Sets the `link` color. It can be a single value, or an array for specifying color for each `link`. If `link.color` is omitted, then by default, a translucent grey link will be used.",
Expand Down
2 changes: 1 addition & 1 deletion packages/python/plotly/plotly/_widget_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# for automated dev builds
#
# It is edited by hand prior to official releases
__frontend_version__ = "^5.9.0"
__frontend_version__ = "^5.10.0"
3 changes: 3 additions & 0 deletions packages/python/plotly/plotly/graph_objs/_sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ def link(self):

Supported dict properties:

arrowlen
Sets the length (in px) of the links arrow, if
0 no arrow will be drawn.
color
Sets the `link` color. It can be a single
value, or an array for specifying color for
Expand Down
33 changes: 33 additions & 0 deletions packages/python/plotly/plotly/graph_objs/sankey/_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Link(_BaseTraceHierarchyType):
_parent_path_str = "sankey"
_path_str = "sankey.link"
_valid_props = {
"arrowlen",
"color",
"colorscaledefaults",
"colorscales",
Expand All @@ -30,6 +31,27 @@ class Link(_BaseTraceHierarchyType):
"valuesrc",
}

# arrowlen
# --------
@property
def arrowlen(self):
"""
Sets the length (in px) of the links arrow, if 0 no arrow will
be drawn.

The 'arrowlen' property is a number and may be specified as:
- An int or float in the interval [0, inf]

Returns
-------
int|float
"""
return self["arrowlen"]

@arrowlen.setter
def arrowlen(self, val):
self["arrowlen"] = val

# color
# -----
@property
Expand Down Expand Up @@ -599,6 +621,9 @@ def valuesrc(self, val):
@property
def _prop_descriptions(self):
return """\
arrowlen
Sets the length (in px) of the links arrow, if 0 no
arrow will be drawn.
color
Sets the `link` color. It can be a single value, or an
array for specifying color for each `link`. If
Expand Down Expand Up @@ -691,6 +716,7 @@ def _prop_descriptions(self):
def __init__(
self,
arg=None,
arrowlen=None,
color=None,
colorscales=None,
colorscaledefaults=None,
Expand Down Expand Up @@ -722,6 +748,9 @@ def __init__(
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.sankey.Link`
arrowlen
Sets the length (in px) of the links arrow, if 0 no
arrow will be drawn.
color
Sets the `link` color. It can be a single value, or an
array for specifying color for each `link`. If
Expand Down Expand Up @@ -843,6 +872,10 @@ def __init__(

# Populate data dict with properties
# ----------------------------------
_v = arg.pop("arrowlen", None)
_v = arrowlen if arrowlen is not None else _v
if _v is not None:
self["arrowlen"] = _v
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
Expand Down
2 changes: 1 addition & 1 deletion packages/python/plotly/plotly/offline/_plotlyjs_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DO NOT EDIT
# This file is generated by the updatebundle setup.py command
__plotlyjs_version__ = "2.13.3"
__plotlyjs_version__ = "2.14.0"
4 changes: 2 additions & 2 deletions packages/python/plotly/plotly/package_data/plotly.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/python/plotly/plotly/validators/sankey/_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def __init__(self, plotly_name="link", parent_name="sankey", **kwargs):
data_docs=kwargs.pop(
"data_docs",
"""
arrowlen
Sets the length (in px) of the links arrow, if
0 no arrow will be drawn.
color
Sets the `link` color. It can be a single
value, or an array for specifying color for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ._colorscaledefaults import ColorscaledefaultsValidator
from ._colorscales import ColorscalesValidator
from ._color import ColorValidator
from ._arrowlen import ArrowlenValidator
else:
from _plotly_utils.importers import relative_import

Expand All @@ -47,5 +48,6 @@
"._colorscaledefaults.ColorscaledefaultsValidator",
"._colorscales.ColorscalesValidator",
"._color.ColorValidator",
"._arrowlen.ArrowlenValidator",
],
)
12 changes: 12 additions & 0 deletions packages/python/plotly/plotly/validators/sankey/link/_arrowlen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import _plotly_utils.basevalidators


class ArrowlenValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="arrowlen", parent_name="sankey.link", **kwargs):
super(ArrowlenValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop("edit_type", "calc"),
min=kwargs.pop("min", 0),
**kwargs,
)