Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bumping Plotly.js to 2.2 #3282

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 1 commit into from
Jun 28, 2021
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## UNRELEASED

- Updated Plotly.js to from version 2.1.0 to version 2.2.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#220----2021-06-28) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
- new `<trace>.legendgrouptitle` attribute for legend group titles
- new `%h` text formatting directive for half-years
- performance improvements and bug fixes


## [5.0.0] - 2021-06-21

Expand Down
18 changes: 9 additions & 9 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.1.0"
"plotly.js": "^2.2.0"
},
"jupyterlab": {
"extension": "lib/jupyterlab-plugin",
Expand Down
1,719 changes: 1,588 additions & 131 deletions packages/python/plotly/codegen/resources/plot-schema.json

Large diffs are not rendered by default.

136 changes: 104 additions & 32 deletions packages/python/plotly/plotly/graph_objs/_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Bar(_BaseTraceType):
"insidetextanchor",
"insidetextfont",
"legendgroup",
"legendgrouptitle",
"legendrank",
"marker",
"meta",
Expand Down Expand Up @@ -797,6 +798,34 @@ def legendgroup(self):
def legendgroup(self, val):
self["legendgroup"] = val

# legendgrouptitle
# ----------------
@property
def legendgrouptitle(self):
"""
The 'legendgrouptitle' property is an instance of Legendgrouptitle
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Legendgrouptitle`
- A dict of string/value properties that will be passed
to the Legendgrouptitle constructor

Supported dict properties:

font
Sets this legend group's title font.
text
Sets the title of the legend group.

Returns
-------
plotly.graph_objs.bar.Legendgrouptitle
"""
return self["legendgrouptitle"]

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

# legendrank
# ----------
@property
Expand Down Expand Up @@ -1765,12 +1794,16 @@ def xcalendar(self, val):
@property
def xhoverformat(self):
"""
Sets the hover text formatting rule for `x` using d3
formatting mini-languages which are very similar to those in
Python. See: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format And for dates
see: https://github.com/d3/d3-time-format#locale_format By
default the values are formatted using `xaxis.hoverformat`.
Sets the hover text formatting rulefor `x` using d3 formatting
mini-languages which are very similar to those in Python. For
numbers, see: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format. And for dates
see: https://github.com/d3/d3-time-format#locale_format. We add
two items to d3's date formatter: "%h" for half of the year as
a decimal number as well as "%{n}f" for fractional seconds with
n digits. For example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By default
the values are formatted using `xaxis.hoverformat`.

The 'xhoverformat' property is a string and must be specified as:
- A string
Expand Down Expand Up @@ -1968,12 +2001,16 @@ def ycalendar(self, val):
@property
def yhoverformat(self):
"""
Sets the hover text formatting rule for `y` using d3
formatting mini-languages which are very similar to those in
Python. See: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format And for dates
see: https://github.com/d3/d3-time-format#locale_format By
default the values are formatted using `yaxis.hoverformat`.
Sets the hover text formatting rulefor `y` using d3 formatting
mini-languages which are very similar to those in Python. For
numbers, see: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format. And for dates
see: https://github.com/d3/d3-time-format#locale_format. We add
two items to d3's date formatter: "%h" for half of the year as
a decimal number as well as "%{n}f" for fractional seconds with
n digits. For example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By default
the values are formatted using `yaxis.hoverformat`.

The 'yhoverformat' property is a string and must be specified as:
- A string
Expand Down Expand Up @@ -2195,6 +2232,9 @@ def _prop_descriptions(self):
Sets the legend group for this trace. Traces part of
the same legend group hide/show at the same time when
toggling legend items.
legendgrouptitle
:class:`plotly.graph_objects.bar.Legendgrouptitle`
instance or dict with compatible properties
legendrank
Sets the legend rank for this trace. Items and groups
with smaller ranks are presented on top/left side while
Expand Down Expand Up @@ -2361,13 +2401,19 @@ def _prop_descriptions(self):
xcalendar
Sets the calendar system to use with `x` date data.
xhoverformat
Sets the hover text formatting rule for `x` using d3
Sets the hover text formatting rulefor `x` using d3
formatting mini-languages which are very similar to
those in Python. See: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format And for
those in Python. For numbers, see:
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format. And for
dates see: https://github.com/d3/d3-time-
format#locale_format By default the values are
formatted using `xaxis.hoverformat`.
format#locale_format. We add two items to d3's date
formatter: "%h" for half of the year as a decimal
number as well as "%{n}f" for fractional seconds with n
digits. For example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
default the values are formatted using
`xaxis.hoverformat`.
xperiod
Only relevant when the axis `type` is "date". Sets the
period positioning in milliseconds or "M<n>" on the x
Expand Down Expand Up @@ -2401,13 +2447,19 @@ def _prop_descriptions(self):
ycalendar
Sets the calendar system to use with `y` date data.
yhoverformat
Sets the hover text formatting rule for `y` using d3
Sets the hover text formatting rulefor `y` using d3
formatting mini-languages which are very similar to
those in Python. See: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format And for
those in Python. For numbers, see:
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format. And for
dates see: https://github.com/d3/d3-time-
format#locale_format By default the values are
formatted using `yaxis.hoverformat`.
format#locale_format. We add two items to d3's date
formatter: "%h" for half of the year as a decimal
number as well as "%{n}f" for fractional seconds with n
digits. For example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
default the values are formatted using
`yaxis.hoverformat`.
yperiod
Only relevant when the axis `type` is "date". Sets the
period positioning in milliseconds or "M<n>" on the y
Expand Down Expand Up @@ -2455,6 +2507,7 @@ def __init__(
insidetextanchor=None,
insidetextfont=None,
legendgroup=None,
legendgrouptitle=None,
legendrank=None,
marker=None,
meta=None,
Expand Down Expand Up @@ -2625,6 +2678,9 @@ def __init__(
Sets the legend group for this trace. Traces part of
the same legend group hide/show at the same time when
toggling legend items.
legendgrouptitle
:class:`plotly.graph_objects.bar.Legendgrouptitle`
instance or dict with compatible properties
legendrank
Sets the legend rank for this trace. Items and groups
with smaller ranks are presented on top/left side while
Expand Down Expand Up @@ -2791,13 +2847,19 @@ def __init__(
xcalendar
Sets the calendar system to use with `x` date data.
xhoverformat
Sets the hover text formatting rule for `x` using d3
Sets the hover text formatting rulefor `x` using d3
formatting mini-languages which are very similar to
those in Python. See: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format And for
those in Python. For numbers, see:
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format. And for
dates see: https://github.com/d3/d3-time-
format#locale_format By default the values are
formatted using `xaxis.hoverformat`.
format#locale_format. We add two items to d3's date
formatter: "%h" for half of the year as a decimal
number as well as "%{n}f" for fractional seconds with n
digits. For example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
default the values are formatted using
`xaxis.hoverformat`.
xperiod
Only relevant when the axis `type` is "date". Sets the
period positioning in milliseconds or "M<n>" on the x
Expand Down Expand Up @@ -2831,13 +2893,19 @@ def __init__(
ycalendar
Sets the calendar system to use with `y` date data.
yhoverformat
Sets the hover text formatting rule for `y` using d3
Sets the hover text formatting rulefor `y` using d3
formatting mini-languages which are very similar to
those in Python. See: https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format And for
those in Python. For numbers, see:
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format. And for
dates see: https://github.com/d3/d3-time-
format#locale_format By default the values are
formatted using `yaxis.hoverformat`.
format#locale_format. We add two items to d3's date
formatter: "%h" for half of the year as a decimal
number as well as "%{n}f" for fractional seconds with n
digits. For example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
default the values are formatted using
`yaxis.hoverformat`.
yperiod
Only relevant when the axis `type` is "date". Sets the
period positioning in milliseconds or "M<n>" on the y
Expand Down Expand Up @@ -2983,6 +3051,10 @@ def __init__(
_v = legendgroup if legendgroup is not None else _v
if _v is not None:
self["legendgroup"] = _v
_v = arg.pop("legendgrouptitle", None)
_v = legendgrouptitle if legendgrouptitle is not None else _v
if _v is not None:
self["legendgrouptitle"] = _v
_v = arg.pop("legendrank", None)
_v = legendrank if legendrank is not None else _v
if _v is not None:
Expand Down
40 changes: 40 additions & 0 deletions packages/python/plotly/plotly/graph_objs/_barpolar.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Barpolar(_BaseTraceType):
"ids",
"idssrc",
"legendgroup",
"legendgrouptitle",
"legendrank",
"marker",
"meta",
Expand Down Expand Up @@ -462,6 +463,34 @@ def legendgroup(self):
def legendgroup(self, val):
self["legendgroup"] = val

# legendgrouptitle
# ----------------
@property
def legendgrouptitle(self):
"""
The 'legendgrouptitle' property is an instance of Legendgrouptitle
that may be specified as:
- An instance of :class:`plotly.graph_objs.barpolar.Legendgrouptitle`
- A dict of string/value properties that will be passed
to the Legendgrouptitle constructor

Supported dict properties:

font
Sets this legend group's title font.
text
Sets the title of the legend group.

Returns
-------
plotly.graph_objs.barpolar.Legendgrouptitle
"""
return self["legendgrouptitle"]

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

# legendrank
# ----------
@property
Expand Down Expand Up @@ -1305,6 +1334,9 @@ def _prop_descriptions(self):
Sets the legend group for this trace. Traces part of
the same legend group hide/show at the same time when
toggling legend items.
legendgrouptitle
:class:`plotly.graph_objects.barpolar.Legendgrouptitle`
instance or dict with compatible properties
legendrank
Sets the legend rank for this trace. Items and groups
with smaller ranks are presented on top/left side while
Expand Down Expand Up @@ -1449,6 +1481,7 @@ def __init__(
ids=None,
idssrc=None,
legendgroup=None,
legendgrouptitle=None,
legendrank=None,
marker=None,
meta=None,
Expand Down Expand Up @@ -1569,6 +1602,9 @@ def __init__(
Sets the legend group for this trace. Traces part of
the same legend group hide/show at the same time when
toggling legend items.
legendgrouptitle
:class:`plotly.graph_objects.barpolar.Legendgrouptitle`
instance or dict with compatible properties
legendrank
Sets the legend rank for this trace. Items and groups
with smaller ranks are presented on top/left side while
Expand Down Expand Up @@ -1790,6 +1826,10 @@ def __init__(
_v = legendgroup if legendgroup is not None else _v
if _v is not None:
self["legendgroup"] = _v
_v = arg.pop("legendgrouptitle", None)
_v = legendgrouptitle if legendgrouptitle is not None else _v
if _v is not None:
self["legendgrouptitle"] = _v
_v = arg.pop("legendrank", None)
_v = legendrank if legendrank is not None else _v
if _v is not None:
Expand Down
Loading