Skip to content

upgrade to plotly.js 1.54 #2427

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 2 commits into from
May 1, 2020
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
364 changes: 167 additions & 197 deletions packages/javascript/plotlywidget/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/javascript/plotlywidget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"typescript": "~3.1.1"
},
"dependencies": {
"plotly.js": "^1.53.0",
"plotly.js": "^1.54.0",
"@jupyter-widgets/base": "^2.0.0 || ^3.0.0",
"lodash": "^4.17.4"
},
Expand Down
156 changes: 154 additions & 2 deletions packages/python/plotly/codegen/resources/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41235,6 +41235,21 @@
"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.",
"editType": "calc"
},
"angle": {
"valType": "number",
"dflt": "auto",
"role": "style",
"arrayOk": true,
"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.",
"editType": "calc"
},
"allowoverlap": {
"valType": "boolean",
"dflt": false,
"role": "style",
"description": "Flag to draw all symbols, even if they overlap.",
"editType": "calc"
},
"opacity": {
"valType": "number",
"min": 0,
Expand Down Expand Up @@ -41864,6 +41879,12 @@
"description": "Sets the source reference on Chart Studio Cloud for symbol .",
"editType": "none"
},
"anglesrc": {
"valType": "string",
"role": "info",
"description": "Sets the source reference on Chart Studio Cloud for angle .",
"editType": "none"
},
"opacitysrc": {
"valType": "string",
"role": "info",
Expand Down Expand Up @@ -57469,6 +57490,114 @@
"editType": "modebar",
"role": "object"
},
"newshape": {
"line": {
"color": {
"valType": "color",
"editType": "none",
"role": "info",
"description": "Sets the line color. By default uses either dark grey or white to increase contrast with background color."
},
"width": {
"valType": "number",
"min": 0,
"dflt": 4,
"role": "info",
"editType": "none",
"description": "Sets the line width (in px)."
},
"dash": {
"valType": "string",
"values": [
"solid",
"dot",
"dash",
"longdash",
"dashdot",
"longdashdot"
],
"dflt": "solid",
"role": "style",
"editType": "none",
"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*)."
},
"role": "object",
"editType": "none"
},
"fillcolor": {
"valType": "color",
"dflt": "rgba(0,0,0,0)",
"role": "info",
"editType": "none",
"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."
},
"fillrule": {
"valType": "enumerated",
"values": [
"evenodd",
"nonzero"
],
"dflt": "evenodd",
"role": "info",
"editType": "none",
"description": "Determines the path's interior. For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"
},
"opacity": {
"valType": "number",
"min": 0,
"max": 1,
"dflt": 1,
"role": "info",
"editType": "none",
"description": "Sets the opacity of new shapes."
},
"layer": {
"valType": "enumerated",
"values": [
"below",
"above"
],
"dflt": "above",
"role": "info",
"editType": "none",
"description": "Specifies whether new shapes are drawn below or above traces."
},
"drawdirection": {
"valType": "enumerated",
"role": "info",
"values": [
"ortho",
"horizontal",
"vertical",
"diagonal"
],
"dflt": "diagonal",
"editType": "none",
"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."
},
"editType": "none",
"role": "object"
},
"activeshape": {
"fillcolor": {
"valType": "color",
"dflt": "rgb(255,0,255)",
"role": "style",
"editType": "none",
"description": "Sets the color filling the active shape' interior."
},
"opacity": {
"valType": "number",
"min": 0,
"max": 1,
"dflt": 0.5,
"role": "info",
"editType": "none",
"description": "Sets the opacity of the active shape."
},
"editType": "none",
"role": "object"
},
"meta": {
"valType": "any",
"arrayOk": true,
Expand Down Expand Up @@ -57598,6 +57727,11 @@
"pan",
"select",
"lasso",
"drawclosedpath",
"drawopenpath",
"drawline",
"drawrect",
"drawcircle",
"orbit",
"turntable",
false
Expand Down Expand Up @@ -57708,7 +57842,7 @@
"any"
],
"dflt": "any",
"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.",
"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.",
"editType": "none"
},
"grid": {
Expand Down Expand Up @@ -66817,7 +66951,25 @@
"dflt": "rgba(0,0,0,0)",
"role": "info",
"editType": "arraydraw",
"description": "Sets the color filling the shape's interior."
"description": "Sets the color filling the shape's interior. Only applies to closed shapes."
},
"fillrule": {
"valType": "enumerated",
"values": [
"evenodd",
"nonzero"
],
"dflt": "evenodd",
"role": "info",
"editType": "arraydraw",
"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"
},
"editable": {
"valType": "boolean",
"role": "info",
"dflt": false,
"editType": "calc+arraydraw",
"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`."
},
"editType": "arraydraw",
"name": {
Expand Down
25 changes: 23 additions & 2 deletions packages/python/plotly/plotly/graph_objs/_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def __init__(

Supported dict properties:

activeshape
:class:`plotly.graph_objects.layout.Activeshape
` instance or dict with compatible properties
angularaxis
:class:`plotly.graph_objects.layout.AngularAxis
` instance or dict with compatible properties
Expand Down Expand Up @@ -329,6 +332,9 @@ def __init__(
modebar
:class:`plotly.graph_objects.layout.Modebar`
instance or dict with compatible properties
newshape
:class:`plotly.graph_objects.layout.Newshape`
instance or dict with compatible properties
orientation
Legacy polar charts are deprecated! Please
switch to "polar" subplots. Rotates the entire
Expand Down Expand Up @@ -356,7 +362,7 @@ def __init__(
:class:`plotly.graph_objects.layout.Scene`
instance or dict with compatible properties
selectdirection
When "dragmode" is set to "select", this limits
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"
Expand Down Expand Up @@ -18765,7 +18771,9 @@ def update_shapes(
def add_shape(
self,
arg=None,
editable=None,
fillcolor=None,
fillrule=None,
layer=None,
line=None,
name=None,
Expand Down Expand Up @@ -18796,8 +18804,19 @@ def add_shape(
----------
arg
instance of Shape or dict with compatible properties
editable
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`.
fillcolor
Sets the color filling the shape's interior.
Sets the color filling the shape's interior. Only
applies to closed shapes.
fillrule
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
layer
Specifies whether shapes are drawn below or above
traces.
Expand Down Expand Up @@ -18941,7 +18960,9 @@ def add_shape(

new_obj = _layout.Shape(
arg,
editable=editable,
fillcolor=fillcolor,
fillrule=fillrule,
layer=layer,
line=line,
name=name,
Expand Down
25 changes: 23 additions & 2 deletions packages/python/plotly/plotly/graph_objs/_figurewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def __init__(

Supported dict properties:

activeshape
:class:`plotly.graph_objects.layout.Activeshape
` instance or dict with compatible properties
angularaxis
:class:`plotly.graph_objects.layout.AngularAxis
` instance or dict with compatible properties
Expand Down Expand Up @@ -329,6 +332,9 @@ def __init__(
modebar
:class:`plotly.graph_objects.layout.Modebar`
instance or dict with compatible properties
newshape
:class:`plotly.graph_objects.layout.Newshape`
instance or dict with compatible properties
orientation
Legacy polar charts are deprecated! Please
switch to "polar" subplots. Rotates the entire
Expand Down Expand Up @@ -356,7 +362,7 @@ def __init__(
:class:`plotly.graph_objects.layout.Scene`
instance or dict with compatible properties
selectdirection
When "dragmode" is set to "select", this limits
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"
Expand Down Expand Up @@ -18765,7 +18771,9 @@ def update_shapes(
def add_shape(
self,
arg=None,
editable=None,
fillcolor=None,
fillrule=None,
layer=None,
line=None,
name=None,
Expand Down Expand Up @@ -18796,8 +18804,19 @@ def add_shape(
----------
arg
instance of Shape or dict with compatible properties
editable
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`.
fillcolor
Sets the color filling the shape's interior.
Sets the color filling the shape's interior. Only
applies to closed shapes.
fillrule
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
layer
Specifies whether shapes are drawn below or above
traces.
Expand Down Expand Up @@ -18941,7 +18960,9 @@ def add_shape(

new_obj = _layout.Shape(
arg,
editable=editable,
fillcolor=fillcolor,
fillrule=fillrule,
layer=layer,
line=line,
name=name,
Expand Down
Loading