Skip to content

Commit

Permalink
Merge pull request #3659 from plotly/pjs2.11.1
Browse files Browse the repository at this point in the history
update Plotly.js to 2.11.1
  • Loading branch information
nicolaskruchten authored Mar 31, 2022
2 parents 2c91604 + 27a473e commit 3644568
Show file tree
Hide file tree
Showing 26 changed files with 1,067 additions and 25 deletions.
38 changes: 19 additions & 19 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.

2 changes: 1 addition & 1 deletion packages/javascript/jupyterlab-plotly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@lumino/messaging": "^1.2.3",
"@lumino/widgets": "^1.8.1",
"lodash": "^4.17.4",
"plotly.js": "^2.9.0"
"plotly.js": "^2.11.1"
},
"jupyterlab": {
"extension": "lib/jupyterlab-plugin",
Expand Down
98 changes: 98 additions & 0 deletions packages/python/plotly/codegen/resources/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@
"noBlank": true,
"valType": "string"
},
"typesetMath": {
"description": "Determines whether math should be typeset or not, when MathJax (either v2 or v3) is present on the page.",
"dflt": true,
"valType": "boolean"
},
"watermark": {
"description": "watermark the images with the company's logo",
"dflt": false,
Expand Down Expand Up @@ -42269,6 +42274,99 @@
"editType": "style",
"valType": "color"
},
"fillpattern": {
"bgcolor": {
"arrayOk": true,
"description": "When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is *overlay*. Otherwise, defaults to a transparent background.",
"editType": "style",
"valType": "color"
},
"bgcolorsrc": {
"description": "Sets the source reference on Chart Studio Cloud for `bgcolor`.",
"editType": "none",
"valType": "string"
},
"description": "Sets the pattern within the marker.",
"editType": "style",
"fgcolor": {
"arrayOk": true,
"description": "When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is *replace*. Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`.",
"editType": "style",
"valType": "color"
},
"fgcolorsrc": {
"description": "Sets the source reference on Chart Studio Cloud for `fgcolor`.",
"editType": "none",
"valType": "string"
},
"fgopacity": {
"description": "Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is *overlay*. Otherwise, defaults to 1.",
"editType": "style",
"max": 1,
"min": 0,
"valType": "number"
},
"fillmode": {
"description": "Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`.",
"dflt": "replace",
"editType": "style",
"valType": "enumerated",
"values": [
"replace",
"overlay"
]
},
"role": "object",
"shape": {
"arrayOk": true,
"description": "Sets the shape of the pattern fill. By default, no pattern is used for filling the area.",
"dflt": "",
"editType": "style",
"valType": "enumerated",
"values": [
"",
"/",
"\\",
"x",
"-",
"|",
"+",
"."
]
},
"shapesrc": {
"description": "Sets the source reference on Chart Studio Cloud for `shape`.",
"editType": "none",
"valType": "string"
},
"size": {
"arrayOk": true,
"description": "Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern.",
"dflt": 8,
"editType": "style",
"min": 0,
"valType": "number"
},
"sizesrc": {
"description": "Sets the source reference on Chart Studio Cloud for `size`.",
"editType": "none",
"valType": "string"
},
"solidity": {
"arrayOk": true,
"description": "Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern.",
"dflt": 0.3,
"editType": "style",
"max": 1,
"min": 0,
"valType": "number"
},
"soliditysrc": {
"description": "Sets the source reference on Chart Studio Cloud for `solidity`.",
"editType": "none",
"valType": "string"
}
},
"groupnorm": {
"description": "Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used - including if `visible` is *legendonly* but not if it is `false`. Sets the normalization for the sum of this `stackgroup`. With *fraction*, the value of each trace at each location is divided by the sum of all trace values at that location. *percent* is the same but multiplied by 100 to show percentages. If there are multiple subplots, or multiple `stackgroup`s on one subplot, each will be normalized within its own set.",
"dflt": "",
Expand Down
4 changes: 4 additions & 0 deletions packages/python/plotly/plotly/graph_objs/_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -12053,6 +12053,7 @@ def add_scatter(
error_y=None,
fill=None,
fillcolor=None,
fillpattern=None,
groupnorm=None,
hoverinfo=None,
hoverinfosrc=None,
Expand Down Expand Up @@ -12181,6 +12182,8 @@ def add_scatter(
Sets the fill color. Defaults to a half-transparent
variant of the line color, marker color, or marker line
color, whichever is available.
fillpattern
Sets the pattern within the marker.
groupnorm
Only relevant when `stackgroup` is used, and only the
first `groupnorm` found in the `stackgroup` will be
Expand Down Expand Up @@ -12549,6 +12552,7 @@ def add_scatter(
error_y=error_y,
fill=fill,
fillcolor=fillcolor,
fillpattern=fillpattern,
groupnorm=groupnorm,
hoverinfo=hoverinfo,
hoverinfosrc=hoverinfosrc,
Expand Down
4 changes: 4 additions & 0 deletions packages/python/plotly/plotly/graph_objs/_figurewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -12053,6 +12053,7 @@ def add_scatter(
error_y=None,
fill=None,
fillcolor=None,
fillpattern=None,
groupnorm=None,
hoverinfo=None,
hoverinfosrc=None,
Expand Down Expand Up @@ -12181,6 +12182,8 @@ def add_scatter(
Sets the fill color. Defaults to a half-transparent
variant of the line color, marker color, or marker line
color, whichever is available.
fillpattern
Sets the pattern within the marker.
groupnorm
Only relevant when `stackgroup` is used, and only the
first `groupnorm` found in the `stackgroup` will be
Expand Down Expand Up @@ -12549,6 +12552,7 @@ def add_scatter(
error_y=error_y,
fill=fill,
fillcolor=fillcolor,
fillpattern=fillpattern,
groupnorm=groupnorm,
hoverinfo=hoverinfo,
hoverinfosrc=hoverinfosrc,
Expand Down
84 changes: 84 additions & 0 deletions packages/python/plotly/plotly/graph_objs/_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Scatter(_BaseTraceType):
"error_y",
"fill",
"fillcolor",
"fillpattern",
"groupnorm",
"hoverinfo",
"hoverinfosrc",
Expand Down Expand Up @@ -468,6 +469,80 @@ def fillcolor(self):
def fillcolor(self, val):
self["fillcolor"] = val

# fillpattern
# -----------
@property
def fillpattern(self):
"""
Sets the pattern within the marker.
The 'fillpattern' property is an instance of Fillpattern
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatter.Fillpattern`
- A dict of string/value properties that will be passed
to the Fillpattern constructor
Supported dict properties:
bgcolor
When there is no colorscale sets the color of
background pattern fill. Defaults to a
`marker.color` background when `fillmode` is
"overlay". Otherwise, defaults to a transparent
background.
bgcolorsrc
Sets the source reference on Chart Studio Cloud
for `bgcolor`.
fgcolor
When there is no colorscale sets the color of
foreground pattern fill. Defaults to a
`marker.color` background when `fillmode` is
"replace". Otherwise, defaults to dark grey or
white to increase contrast with the `bgcolor`.
fgcolorsrc
Sets the source reference on Chart Studio Cloud
for `fgcolor`.
fgopacity
Sets the opacity of the foreground pattern
fill. Defaults to a 0.5 when `fillmode` is
"overlay". Otherwise, defaults to 1.
fillmode
Determines whether `marker.color` should be
used as a default to `bgcolor` or a `fgcolor`.
shape
Sets the shape of the pattern fill. By default,
no pattern is used for filling the area.
shapesrc
Sets the source reference on Chart Studio Cloud
for `shape`.
size
Sets the size of unit squares of the pattern
fill in pixels, which corresponds to the
interval of repetition of the pattern.
sizesrc
Sets the source reference on Chart Studio Cloud
for `size`.
solidity
Sets the solidity of the pattern fill. Solidity
is roughly the fraction of the area filled by
the pattern. Solidity of 0 shows only the
background color without pattern and solidty of
1 shows only the foreground color without
pattern.
soliditysrc
Sets the source reference on Chart Studio Cloud
for `solidity`.
Returns
-------
plotly.graph_objs.scatter.Fillpattern
"""
return self["fillpattern"]

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

# groupnorm
# ---------
@property
Expand Down Expand Up @@ -2169,6 +2244,8 @@ def _prop_descriptions(self):
Sets the fill color. Defaults to a half-transparent
variant of the line color, marker color, or marker line
color, whichever is available.
fillpattern
Sets the pattern within the marker.
groupnorm
Only relevant when `stackgroup` is used, and only the
first `groupnorm` found in the `stackgroup` will be
Expand Down Expand Up @@ -2514,6 +2591,7 @@ def __init__(
error_y=None,
fill=None,
fillcolor=None,
fillpattern=None,
groupnorm=None,
hoverinfo=None,
hoverinfosrc=None,
Expand Down Expand Up @@ -2642,6 +2720,8 @@ def __init__(
Sets the fill color. Defaults to a half-transparent
variant of the line color, marker color, or marker line
color, whichever is available.
fillpattern
Sets the pattern within the marker.
groupnorm
Only relevant when `stackgroup` is used, and only the
first `groupnorm` found in the `stackgroup` will be
Expand Down Expand Up @@ -3046,6 +3126,10 @@ def __init__(
_v = fillcolor if fillcolor is not None else _v
if _v is not None:
self["fillcolor"] = _v
_v = arg.pop("fillpattern", None)
_v = fillpattern if fillpattern is not None else _v
if _v is not None:
self["fillpattern"] = _v
_v = arg.pop("groupnorm", None)
_v = groupnorm if groupnorm is not None else _v
if _v is not None:
Expand Down
2 changes: 2 additions & 0 deletions packages/python/plotly/plotly/graph_objs/scatter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
if sys.version_info < (3, 7):
from ._error_x import ErrorX
from ._error_y import ErrorY
from ._fillpattern import Fillpattern
from ._hoverlabel import Hoverlabel
from ._legendgrouptitle import Legendgrouptitle
from ._line import Line
Expand All @@ -25,6 +26,7 @@
[
"._error_x.ErrorX",
"._error_y.ErrorY",
"._fillpattern.Fillpattern",
"._hoverlabel.Hoverlabel",
"._legendgrouptitle.Legendgrouptitle",
"._line.Line",
Expand Down
Loading

0 comments on commit 3644568

Please sign in to comment.