Skip to content

Commit 3c1a7d1

Browse files
authored
upgrade to plotly.js 1.54 (#2427)
* upgrade to plotly.js 1.54 * add new files
1 parent e7ad710 commit 3c1a7d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1956
-220
lines changed

packages/javascript/plotlywidget/package-lock.json

Lines changed: 167 additions & 197 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/javascript/plotlywidget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"typescript": "~3.1.1"
3434
},
3535
"dependencies": {
36-
"plotly.js": "^1.53.0",
36+
"plotly.js": "^1.54.0",
3737
"@jupyter-widgets/base": "^2.0.0 || ^3.0.0",
3838
"lodash": "^4.17.4"
3939
},

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

Lines changed: 154 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41235,6 +41235,21 @@
4123541235
"description": "Sets the marker symbol. Full list: https://www.mapbox.com/maki-icons/ Note that the array `marker.color` and `marker.size` are only available for *circle* symbols.",
4123641236
"editType": "calc"
4123741237
},
41238+
"angle": {
41239+
"valType": "number",
41240+
"dflt": "auto",
41241+
"role": "style",
41242+
"arrayOk": true,
41243+
"description": "Sets the marker orientation from true North, in degrees clockwise. When using the *auto* default, no rotation would be applied in perspective views which is different from using a zero angle.",
41244+
"editType": "calc"
41245+
},
41246+
"allowoverlap": {
41247+
"valType": "boolean",
41248+
"dflt": false,
41249+
"role": "style",
41250+
"description": "Flag to draw all symbols, even if they overlap.",
41251+
"editType": "calc"
41252+
},
4123841253
"opacity": {
4123941254
"valType": "number",
4124041255
"min": 0,
@@ -41864,6 +41879,12 @@
4186441879
"description": "Sets the source reference on Chart Studio Cloud for symbol .",
4186541880
"editType": "none"
4186641881
},
41882+
"anglesrc": {
41883+
"valType": "string",
41884+
"role": "info",
41885+
"description": "Sets the source reference on Chart Studio Cloud for angle .",
41886+
"editType": "none"
41887+
},
4186741888
"opacitysrc": {
4186841889
"valType": "string",
4186941890
"role": "info",
@@ -57469,6 +57490,114 @@
5746957490
"editType": "modebar",
5747057491
"role": "object"
5747157492
},
57493+
"newshape": {
57494+
"line": {
57495+
"color": {
57496+
"valType": "color",
57497+
"editType": "none",
57498+
"role": "info",
57499+
"description": "Sets the line color. By default uses either dark grey or white to increase contrast with background color."
57500+
},
57501+
"width": {
57502+
"valType": "number",
57503+
"min": 0,
57504+
"dflt": 4,
57505+
"role": "info",
57506+
"editType": "none",
57507+
"description": "Sets the line width (in px)."
57508+
},
57509+
"dash": {
57510+
"valType": "string",
57511+
"values": [
57512+
"solid",
57513+
"dot",
57514+
"dash",
57515+
"longdash",
57516+
"dashdot",
57517+
"longdashdot"
57518+
],
57519+
"dflt": "solid",
57520+
"role": "style",
57521+
"editType": "none",
57522+
"description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*)."
57523+
},
57524+
"role": "object",
57525+
"editType": "none"
57526+
},
57527+
"fillcolor": {
57528+
"valType": "color",
57529+
"dflt": "rgba(0,0,0,0)",
57530+
"role": "info",
57531+
"editType": "none",
57532+
"description": "Sets the color filling new shapes' interior. Please note that if using a fillcolor with alpha greater than half, drag inside the active shape starts moving the shape underneath, otherwise a new shape could be started over."
57533+
},
57534+
"fillrule": {
57535+
"valType": "enumerated",
57536+
"values": [
57537+
"evenodd",
57538+
"nonzero"
57539+
],
57540+
"dflt": "evenodd",
57541+
"role": "info",
57542+
"editType": "none",
57543+
"description": "Determines the path's interior. For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"
57544+
},
57545+
"opacity": {
57546+
"valType": "number",
57547+
"min": 0,
57548+
"max": 1,
57549+
"dflt": 1,
57550+
"role": "info",
57551+
"editType": "none",
57552+
"description": "Sets the opacity of new shapes."
57553+
},
57554+
"layer": {
57555+
"valType": "enumerated",
57556+
"values": [
57557+
"below",
57558+
"above"
57559+
],
57560+
"dflt": "above",
57561+
"role": "info",
57562+
"editType": "none",
57563+
"description": "Specifies whether new shapes are drawn below or above traces."
57564+
},
57565+
"drawdirection": {
57566+
"valType": "enumerated",
57567+
"role": "info",
57568+
"values": [
57569+
"ortho",
57570+
"horizontal",
57571+
"vertical",
57572+
"diagonal"
57573+
],
57574+
"dflt": "diagonal",
57575+
"editType": "none",
57576+
"description": "When `dragmode` is set to *drawrect*, *drawline* or *drawcircle* this limits the drag to be horizontal, vertical or diagonal. Using *diagonal* there is no limit e.g. in drawing lines in any direction. *ortho* limits the draw to be either horizontal or vertical. *horizontal* allows horizontal extend. *vertical* allows vertical extend."
57577+
},
57578+
"editType": "none",
57579+
"role": "object"
57580+
},
57581+
"activeshape": {
57582+
"fillcolor": {
57583+
"valType": "color",
57584+
"dflt": "rgb(255,0,255)",
57585+
"role": "style",
57586+
"editType": "none",
57587+
"description": "Sets the color filling the active shape' interior."
57588+
},
57589+
"opacity": {
57590+
"valType": "number",
57591+
"min": 0,
57592+
"max": 1,
57593+
"dflt": 0.5,
57594+
"role": "info",
57595+
"editType": "none",
57596+
"description": "Sets the opacity of the active shape."
57597+
},
57598+
"editType": "none",
57599+
"role": "object"
57600+
},
5747257601
"meta": {
5747357602
"valType": "any",
5747457603
"arrayOk": true,
@@ -57598,6 +57727,11 @@
5759857727
"pan",
5759957728
"select",
5760057729
"lasso",
57730+
"drawclosedpath",
57731+
"drawopenpath",
57732+
"drawline",
57733+
"drawrect",
57734+
"drawcircle",
5760157735
"orbit",
5760257736
"turntable",
5760357737
false
@@ -57708,7 +57842,7 @@
5770857842
"any"
5770957843
],
5771057844
"dflt": "any",
57711-
"description": "When \"dragmode\" is set to \"select\", this limits the selection of the drag to horizontal, vertical or diagonal. \"h\" only allows horizontal selection, \"v\" only vertical, \"d\" only diagonal and \"any\" sets no limit.",
57845+
"description": "When `dragmode` is set to *select*, this limits the selection of the drag to horizontal, vertical or diagonal. *h* only allows horizontal selection, *v* only vertical, *d* only diagonal and *any* sets no limit.",
5771257846
"editType": "none"
5771357847
},
5771457848
"grid": {
@@ -66817,7 +66951,25 @@
6681766951
"dflt": "rgba(0,0,0,0)",
6681866952
"role": "info",
6681966953
"editType": "arraydraw",
66820-
"description": "Sets the color filling the shape's interior."
66954+
"description": "Sets the color filling the shape's interior. Only applies to closed shapes."
66955+
},
66956+
"fillrule": {
66957+
"valType": "enumerated",
66958+
"values": [
66959+
"evenodd",
66960+
"nonzero"
66961+
],
66962+
"dflt": "evenodd",
66963+
"role": "info",
66964+
"editType": "arraydraw",
66965+
"description": "Determines which regions of complex paths constitute the interior. For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"
66966+
},
66967+
"editable": {
66968+
"valType": "boolean",
66969+
"role": "info",
66970+
"dflt": false,
66971+
"editType": "calc+arraydraw",
66972+
"description": "Determines whether the shape could be activated for edit or not. Has no effect when the older editable shapes mode is enabled via `config.editable` or `config.edits.shapePosition`."
6682166973
},
6682266974
"editType": "arraydraw",
6682366975
"name": {

packages/python/plotly/plotly/graph_objs/_figure.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def __init__(
4949

5050
Supported dict properties:
5151

52+
activeshape
53+
:class:`plotly.graph_objects.layout.Activeshape
54+
` instance or dict with compatible properties
5255
angularaxis
5356
:class:`plotly.graph_objects.layout.AngularAxis
5457
` instance or dict with compatible properties
@@ -329,6 +332,9 @@ def __init__(
329332
modebar
330333
:class:`plotly.graph_objects.layout.Modebar`
331334
instance or dict with compatible properties
335+
newshape
336+
:class:`plotly.graph_objects.layout.Newshape`
337+
instance or dict with compatible properties
332338
orientation
333339
Legacy polar charts are deprecated! Please
334340
switch to "polar" subplots. Rotates the entire
@@ -356,7 +362,7 @@ def __init__(
356362
:class:`plotly.graph_objects.layout.Scene`
357363
instance or dict with compatible properties
358364
selectdirection
359-
When "dragmode" is set to "select", this limits
365+
When `dragmode` is set to "select", this limits
360366
the selection of the drag to horizontal,
361367
vertical or diagonal. "h" only allows
362368
horizontal selection, "v" only vertical, "d"
@@ -18765,7 +18771,9 @@ def update_shapes(
1876518771
def add_shape(
1876618772
self,
1876718773
arg=None,
18774+
editable=None,
1876818775
fillcolor=None,
18776+
fillrule=None,
1876918777
layer=None,
1877018778
line=None,
1877118779
name=None,
@@ -18796,8 +18804,19 @@ def add_shape(
1879618804
----------
1879718805
arg
1879818806
instance of Shape or dict with compatible properties
18807+
editable
18808+
Determines whether the shape could be activated for
18809+
edit or not. Has no effect when the older editable
18810+
shapes mode is enabled via `config.editable` or
18811+
`config.edits.shapePosition`.
1879918812
fillcolor
18800-
Sets the color filling the shape's interior.
18813+
Sets the color filling the shape's interior. Only
18814+
applies to closed shapes.
18815+
fillrule
18816+
Determines which regions of complex paths constitute
18817+
the interior. For more info please visit
18818+
https://developer.mozilla.org/en-
18819+
US/docs/Web/SVG/Attribute/fill-rule
1880118820
layer
1880218821
Specifies whether shapes are drawn below or above
1880318822
traces.
@@ -18941,7 +18960,9 @@ def add_shape(
1894118960

1894218961
new_obj = _layout.Shape(
1894318962
arg,
18963+
editable=editable,
1894418964
fillcolor=fillcolor,
18965+
fillrule=fillrule,
1894518966
layer=layer,
1894618967
line=line,
1894718968
name=name,

packages/python/plotly/plotly/graph_objs/_figurewidget.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def __init__(
4949

5050
Supported dict properties:
5151

52+
activeshape
53+
:class:`plotly.graph_objects.layout.Activeshape
54+
` instance or dict with compatible properties
5255
angularaxis
5356
:class:`plotly.graph_objects.layout.AngularAxis
5457
` instance or dict with compatible properties
@@ -329,6 +332,9 @@ def __init__(
329332
modebar
330333
:class:`plotly.graph_objects.layout.Modebar`
331334
instance or dict with compatible properties
335+
newshape
336+
:class:`plotly.graph_objects.layout.Newshape`
337+
instance or dict with compatible properties
332338
orientation
333339
Legacy polar charts are deprecated! Please
334340
switch to "polar" subplots. Rotates the entire
@@ -356,7 +362,7 @@ def __init__(
356362
:class:`plotly.graph_objects.layout.Scene`
357363
instance or dict with compatible properties
358364
selectdirection
359-
When "dragmode" is set to "select", this limits
365+
When `dragmode` is set to "select", this limits
360366
the selection of the drag to horizontal,
361367
vertical or diagonal. "h" only allows
362368
horizontal selection, "v" only vertical, "d"
@@ -18765,7 +18771,9 @@ def update_shapes(
1876518771
def add_shape(
1876618772
self,
1876718773
arg=None,
18774+
editable=None,
1876818775
fillcolor=None,
18776+
fillrule=None,
1876918777
layer=None,
1877018778
line=None,
1877118779
name=None,
@@ -18796,8 +18804,19 @@ def add_shape(
1879618804
----------
1879718805
arg
1879818806
instance of Shape or dict with compatible properties
18807+
editable
18808+
Determines whether the shape could be activated for
18809+
edit or not. Has no effect when the older editable
18810+
shapes mode is enabled via `config.editable` or
18811+
`config.edits.shapePosition`.
1879918812
fillcolor
18800-
Sets the color filling the shape's interior.
18813+
Sets the color filling the shape's interior. Only
18814+
applies to closed shapes.
18815+
fillrule
18816+
Determines which regions of complex paths constitute
18817+
the interior. For more info please visit
18818+
https://developer.mozilla.org/en-
18819+
US/docs/Web/SVG/Attribute/fill-rule
1880118820
layer
1880218821
Specifies whether shapes are drawn below or above
1880318822
traces.
@@ -18941,7 +18960,9 @@ def add_shape(
1894118960

1894218961
new_obj = _layout.Shape(
1894318962
arg,
18963+
editable=editable,
1894418964
fillcolor=fillcolor,
18965+
fillrule=fillrule,
1894518966
layer=layer,
1894618967
line=line,
1894718968
name=name,

0 commit comments

Comments
 (0)