Skip to content

Commit 473c263

Browse files
bump plotly.js to 2.14.0
1 parent f9bd7da commit 473c263

File tree

12 files changed

+87
-29
lines changed

12 files changed

+87
-29
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [5.10.0] - 2022-07-26
5+
## [5.10.0] - 2022-08-11
66

77
### Updated
8-
- 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:
8+
- 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:
9+
- Add support for `sankey` links with arrows
910
- Add `selections`, `newselection` and `activeselection` layout attributes to have persistent and editable selections over cartesian subplots
1011
- Add `unselected.line.color` and `unselected.line.opacity` options to `parcoords` trace
1112
- Display Plotly's new logo in the modebar

packages/javascript/jupyterlab-plotly/package-lock.json

+14-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/javascript/jupyterlab-plotly/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@lumino/messaging": "^1.2.3",
6666
"@lumino/widgets": "^1.8.1",
6767
"lodash": "^4.17.4",
68-
"plotly.js": "^2.13.3"
68+
"plotly.js": "^2.14.0"
6969
},
7070
"jupyterlab": {
7171
"extension": "lib/jupyterlab-plugin",

packages/javascript/jupyterlab-plotly/src/Figure.ts

+1
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,7 @@ export class FigureView extends DOMWidgetView {
846846
var initialTraces = _.cloneDeep(this.model.get("_data"));
847847
var initialLayout = _.cloneDeep(this.model.get("_layout"));
848848
var config = this.model.get("_config");
849+
config.editSelection = false;
849850

850851
Plotly.newPlot(that.el, initialTraces, initialLayout, config).then(
851852
function () {

packages/python/plotly/codegen/resources/plot-schema.json

+12
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@
199199
"valType": "boolean"
200200
}
201201
},
202+
"editSelection": {
203+
"description": "Enables moving selections.",
204+
"dflt": true,
205+
"valType": "boolean"
206+
},
202207
"fillFrame": {
203208
"description": "When `layout.autosize` is turned on, determines whether the graph fills the container (the default) or the screen (if set to *true*).",
204209
"dflt": false,
@@ -42051,6 +42056,13 @@
4205142056
"valType": "number"
4205242057
},
4205342058
"link": {
42059+
"arrowlen": {
42060+
"description": "Sets the length (in px) of the links arrow, if 0 no arrow will be drawn.",
42061+
"dflt": 0,
42062+
"editType": "calc",
42063+
"min": 0,
42064+
"valType": "number"
42065+
},
4205442066
"color": {
4205542067
"arrayOk": true,
4205642068
"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.",

packages/python/plotly/plotly/graph_objs/_sankey.py

+3
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ def link(self):
339339
340340
Supported dict properties:
341341
342+
arrowlen
343+
Sets the length (in px) of the links arrow, if
344+
0 no arrow will be drawn.
342345
color
343346
Sets the `link` color. It can be a single
344347
value, or an array for specifying color for

packages/python/plotly/plotly/graph_objs/sankey/_link.py

+33
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Link(_BaseTraceHierarchyType):
99
_parent_path_str = "sankey"
1010
_path_str = "sankey.link"
1111
_valid_props = {
12+
"arrowlen",
1213
"color",
1314
"colorscaledefaults",
1415
"colorscales",
@@ -30,6 +31,27 @@ class Link(_BaseTraceHierarchyType):
3031
"valuesrc",
3132
}
3233

34+
# arrowlen
35+
# --------
36+
@property
37+
def arrowlen(self):
38+
"""
39+
Sets the length (in px) of the links arrow, if 0 no arrow will
40+
be drawn.
41+
42+
The 'arrowlen' property is a number and may be specified as:
43+
- An int or float in the interval [0, inf]
44+
45+
Returns
46+
-------
47+
int|float
48+
"""
49+
return self["arrowlen"]
50+
51+
@arrowlen.setter
52+
def arrowlen(self, val):
53+
self["arrowlen"] = val
54+
3355
# color
3456
# -----
3557
@property
@@ -599,6 +621,9 @@ def valuesrc(self, val):
599621
@property
600622
def _prop_descriptions(self):
601623
return """\
624+
arrowlen
625+
Sets the length (in px) of the links arrow, if 0 no
626+
arrow will be drawn.
602627
color
603628
Sets the `link` color. It can be a single value, or an
604629
array for specifying color for each `link`. If
@@ -691,6 +716,7 @@ def _prop_descriptions(self):
691716
def __init__(
692717
self,
693718
arg=None,
719+
arrowlen=None,
694720
color=None,
695721
colorscales=None,
696722
colorscaledefaults=None,
@@ -722,6 +748,9 @@ def __init__(
722748
arg
723749
dict of properties compatible with this constructor or
724750
an instance of :class:`plotly.graph_objs.sankey.Link`
751+
arrowlen
752+
Sets the length (in px) of the links arrow, if 0 no
753+
arrow will be drawn.
725754
color
726755
Sets the `link` color. It can be a single value, or an
727756
array for specifying color for each `link`. If
@@ -843,6 +872,10 @@ def __init__(
843872

844873
# Populate data dict with properties
845874
# ----------------------------------
875+
_v = arg.pop("arrowlen", None)
876+
_v = arrowlen if arrowlen is not None else _v
877+
if _v is not None:
878+
self["arrowlen"] = _v
846879
_v = arg.pop("color", None)
847880
_v = color if color is not None else _v
848881
if _v is not None:
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# DO NOT EDIT
22
# This file is generated by the updatebundle setup.py command
3-
__plotlyjs_version__ = "2.13.3"
3+
__plotlyjs_version__ = "2.14.0"

packages/python/plotly/plotly/package_data/plotly.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/python/plotly/plotly/validators/sankey/_link.py

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ def __init__(self, plotly_name="link", parent_name="sankey", **kwargs):
1010
data_docs=kwargs.pop(
1111
"data_docs",
1212
"""
13+
arrowlen
14+
Sets the length (in px) of the links arrow, if
15+
0 no arrow will be drawn.
1316
color
1417
Sets the `link` color. It can be a single
1518
value, or an array for specifying color for

packages/python/plotly/plotly/validators/sankey/link/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ._colorscaledefaults import ColorscaledefaultsValidator
2222
from ._colorscales import ColorscalesValidator
2323
from ._color import ColorValidator
24+
from ._arrowlen import ArrowlenValidator
2425
else:
2526
from _plotly_utils.importers import relative_import
2627

@@ -47,5 +48,6 @@
4748
"._colorscaledefaults.ColorscaledefaultsValidator",
4849
"._colorscales.ColorscalesValidator",
4950
"._color.ColorValidator",
51+
"._arrowlen.ArrowlenValidator",
5052
],
5153
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import _plotly_utils.basevalidators
2+
3+
4+
class ArrowlenValidator(_plotly_utils.basevalidators.NumberValidator):
5+
def __init__(self, plotly_name="arrowlen", parent_name="sankey.link", **kwargs):
6+
super(ArrowlenValidator, self).__init__(
7+
plotly_name=plotly_name,
8+
parent_name=parent_name,
9+
edit_type=kwargs.pop("edit_type", "calc"),
10+
min=kwargs.pop("min", 0),
11+
**kwargs,
12+
)

0 commit comments

Comments
 (0)