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

Skip to content

Commit c41e9d8

Browse files
bumping Plotly.js to 2.2
1 parent 24cda54 commit c41e9d8

File tree

853 files changed

+35062
-3529
lines changed

Some content is hidden

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

853 files changed

+35062
-3529
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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+
## UNRELEASED
6+
7+
- 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:
8+
- new `<trace>.legendgrouptitle` attribute for legend group titles
9+
- new `%h` text formatting directive for half-years
10+
- performance improvements and bug fixes
11+
512

613
## [5.0.0] - 2021-06-21
714

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

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

packages/javascript/jupyterlab-plotly/package.json

Lines changed: 1 addition & 1 deletion
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.1.0"
68+
"plotly.js": "^2.2.0"
6969
},
7070
"jupyterlab": {
7171
"extension": "lib/jupyterlab-plugin",

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

Lines changed: 1588 additions & 131 deletions
Large diffs are not rendered by default.

packages/python/plotly/plotly/graph_objs/_bar.py

Lines changed: 104 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Bar(_BaseTraceType):
3232
"insidetextanchor",
3333
"insidetextfont",
3434
"legendgroup",
35+
"legendgrouptitle",
3536
"legendrank",
3637
"marker",
3738
"meta",
@@ -797,6 +798,34 @@ def legendgroup(self):
797798
def legendgroup(self, val):
798799
self["legendgroup"] = val
799800

801+
# legendgrouptitle
802+
# ----------------
803+
@property
804+
def legendgrouptitle(self):
805+
"""
806+
The 'legendgrouptitle' property is an instance of Legendgrouptitle
807+
that may be specified as:
808+
- An instance of :class:`plotly.graph_objs.bar.Legendgrouptitle`
809+
- A dict of string/value properties that will be passed
810+
to the Legendgrouptitle constructor
811+
812+
Supported dict properties:
813+
814+
font
815+
Sets this legend group's title font.
816+
text
817+
Sets the title of the legend group.
818+
819+
Returns
820+
-------
821+
plotly.graph_objs.bar.Legendgrouptitle
822+
"""
823+
return self["legendgrouptitle"]
824+
825+
@legendgrouptitle.setter
826+
def legendgrouptitle(self, val):
827+
self["legendgrouptitle"] = val
828+
800829
# legendrank
801830
# ----------
802831
@property
@@ -1765,12 +1794,16 @@ def xcalendar(self, val):
17651794
@property
17661795
def xhoverformat(self):
17671796
"""
1768-
Sets the hover text formatting rule for `x` using d3
1769-
formatting mini-languages which are very similar to those in
1770-
Python. See: https://github.com/d3/d3-3.x-api-
1771-
reference/blob/master/Formatting.md#d3_format And for dates
1772-
see: https://github.com/d3/d3-time-format#locale_format By
1773-
default the values are formatted using `xaxis.hoverformat`.
1797+
Sets the hover text formatting rulefor `x` using d3 formatting
1798+
mini-languages which are very similar to those in Python. For
1799+
numbers, see: https://github.com/d3/d3-3.x-api-
1800+
reference/blob/master/Formatting.md#d3_format. And for dates
1801+
see: https://github.com/d3/d3-time-format#locale_format. We add
1802+
two items to d3's date formatter: "%h" for half of the year as
1803+
a decimal number as well as "%{n}f" for fractional seconds with
1804+
n digits. For example, *2016-10-13 09:15:23.456* with
1805+
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By default
1806+
the values are formatted using `xaxis.hoverformat`.
17741807
17751808
The 'xhoverformat' property is a string and must be specified as:
17761809
- A string
@@ -1968,12 +2001,16 @@ def ycalendar(self, val):
19682001
@property
19692002
def yhoverformat(self):
19702003
"""
1971-
Sets the hover text formatting rule for `y` using d3
1972-
formatting mini-languages which are very similar to those in
1973-
Python. See: https://github.com/d3/d3-3.x-api-
1974-
reference/blob/master/Formatting.md#d3_format And for dates
1975-
see: https://github.com/d3/d3-time-format#locale_format By
1976-
default the values are formatted using `yaxis.hoverformat`.
2004+
Sets the hover text formatting rulefor `y` using d3 formatting
2005+
mini-languages which are very similar to those in Python. For
2006+
numbers, see: https://github.com/d3/d3-3.x-api-
2007+
reference/blob/master/Formatting.md#d3_format. And for dates
2008+
see: https://github.com/d3/d3-time-format#locale_format. We add
2009+
two items to d3's date formatter: "%h" for half of the year as
2010+
a decimal number as well as "%{n}f" for fractional seconds with
2011+
n digits. For example, *2016-10-13 09:15:23.456* with
2012+
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By default
2013+
the values are formatted using `yaxis.hoverformat`.
19772014
19782015
The 'yhoverformat' property is a string and must be specified as:
19792016
- A string
@@ -2195,6 +2232,9 @@ def _prop_descriptions(self):
21952232
Sets the legend group for this trace. Traces part of
21962233
the same legend group hide/show at the same time when
21972234
toggling legend items.
2235+
legendgrouptitle
2236+
:class:`plotly.graph_objects.bar.Legendgrouptitle`
2237+
instance or dict with compatible properties
21982238
legendrank
21992239
Sets the legend rank for this trace. Items and groups
22002240
with smaller ranks are presented on top/left side while
@@ -2361,13 +2401,19 @@ def _prop_descriptions(self):
23612401
xcalendar
23622402
Sets the calendar system to use with `x` date data.
23632403
xhoverformat
2364-
Sets the hover text formatting rule for `x` using d3
2404+
Sets the hover text formatting rulefor `x` using d3
23652405
formatting mini-languages which are very similar to
2366-
those in Python. See: https://github.com/d3/d3-3.x-api-
2367-
reference/blob/master/Formatting.md#d3_format And for
2406+
those in Python. For numbers, see:
2407+
https://github.com/d3/d3-3.x-api-
2408+
reference/blob/master/Formatting.md#d3_format. And for
23682409
dates see: https://github.com/d3/d3-time-
2369-
format#locale_format By default the values are
2370-
formatted using `xaxis.hoverformat`.
2410+
format#locale_format. We add two items to d3's date
2411+
formatter: "%h" for half of the year as a decimal
2412+
number as well as "%{n}f" for fractional seconds with n
2413+
digits. For example, *2016-10-13 09:15:23.456* with
2414+
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
2415+
default the values are formatted using
2416+
`xaxis.hoverformat`.
23712417
xperiod
23722418
Only relevant when the axis `type` is "date". Sets the
23732419
period positioning in milliseconds or "M<n>" on the x
@@ -2401,13 +2447,19 @@ def _prop_descriptions(self):
24012447
ycalendar
24022448
Sets the calendar system to use with `y` date data.
24032449
yhoverformat
2404-
Sets the hover text formatting rule for `y` using d3
2450+
Sets the hover text formatting rulefor `y` using d3
24052451
formatting mini-languages which are very similar to
2406-
those in Python. See: https://github.com/d3/d3-3.x-api-
2407-
reference/blob/master/Formatting.md#d3_format And for
2452+
those in Python. For numbers, see:
2453+
https://github.com/d3/d3-3.x-api-
2454+
reference/blob/master/Formatting.md#d3_format. And for
24082455
dates see: https://github.com/d3/d3-time-
2409-
format#locale_format By default the values are
2410-
formatted using `yaxis.hoverformat`.
2456+
format#locale_format. We add two items to d3's date
2457+
formatter: "%h" for half of the year as a decimal
2458+
number as well as "%{n}f" for fractional seconds with n
2459+
digits. For example, *2016-10-13 09:15:23.456* with
2460+
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
2461+
default the values are formatted using
2462+
`yaxis.hoverformat`.
24112463
yperiod
24122464
Only relevant when the axis `type` is "date". Sets the
24132465
period positioning in milliseconds or "M<n>" on the y
@@ -2455,6 +2507,7 @@ def __init__(
24552507
insidetextanchor=None,
24562508
insidetextfont=None,
24572509
legendgroup=None,
2510+
legendgrouptitle=None,
24582511
legendrank=None,
24592512
marker=None,
24602513
meta=None,
@@ -2625,6 +2678,9 @@ def __init__(
26252678
Sets the legend group for this trace. Traces part of
26262679
the same legend group hide/show at the same time when
26272680
toggling legend items.
2681+
legendgrouptitle
2682+
:class:`plotly.graph_objects.bar.Legendgrouptitle`
2683+
instance or dict with compatible properties
26282684
legendrank
26292685
Sets the legend rank for this trace. Items and groups
26302686
with smaller ranks are presented on top/left side while
@@ -2791,13 +2847,19 @@ def __init__(
27912847
xcalendar
27922848
Sets the calendar system to use with `x` date data.
27932849
xhoverformat
2794-
Sets the hover text formatting rule for `x` using d3
2850+
Sets the hover text formatting rulefor `x` using d3
27952851
formatting mini-languages which are very similar to
2796-
those in Python. See: https://github.com/d3/d3-3.x-api-
2797-
reference/blob/master/Formatting.md#d3_format And for
2852+
those in Python. For numbers, see:
2853+
https://github.com/d3/d3-3.x-api-
2854+
reference/blob/master/Formatting.md#d3_format. And for
27982855
dates see: https://github.com/d3/d3-time-
2799-
format#locale_format By default the values are
2800-
formatted using `xaxis.hoverformat`.
2856+
format#locale_format. We add two items to d3's date
2857+
formatter: "%h" for half of the year as a decimal
2858+
number as well as "%{n}f" for fractional seconds with n
2859+
digits. For example, *2016-10-13 09:15:23.456* with
2860+
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
2861+
default the values are formatted using
2862+
`xaxis.hoverformat`.
28012863
xperiod
28022864
Only relevant when the axis `type` is "date". Sets the
28032865
period positioning in milliseconds or "M<n>" on the x
@@ -2831,13 +2893,19 @@ def __init__(
28312893
ycalendar
28322894
Sets the calendar system to use with `y` date data.
28332895
yhoverformat
2834-
Sets the hover text formatting rule for `y` using d3
2896+
Sets the hover text formatting rulefor `y` using d3
28352897
formatting mini-languages which are very similar to
2836-
those in Python. See: https://github.com/d3/d3-3.x-api-
2837-
reference/blob/master/Formatting.md#d3_format And for
2898+
those in Python. For numbers, see:
2899+
https://github.com/d3/d3-3.x-api-
2900+
reference/blob/master/Formatting.md#d3_format. And for
28382901
dates see: https://github.com/d3/d3-time-
2839-
format#locale_format By default the values are
2840-
formatted using `yaxis.hoverformat`.
2902+
format#locale_format. We add two items to d3's date
2903+
formatter: "%h" for half of the year as a decimal
2904+
number as well as "%{n}f" for fractional seconds with n
2905+
digits. For example, *2016-10-13 09:15:23.456* with
2906+
tickformat "%H~%M~%S.%2f" would display *09~15~23.46*By
2907+
default the values are formatted using
2908+
`yaxis.hoverformat`.
28412909
yperiod
28422910
Only relevant when the axis `type` is "date". Sets the
28432911
period positioning in milliseconds or "M<n>" on the y
@@ -2983,6 +3051,10 @@ def __init__(
29833051
_v = legendgroup if legendgroup is not None else _v
29843052
if _v is not None:
29853053
self["legendgroup"] = _v
3054+
_v = arg.pop("legendgrouptitle", None)
3055+
_v = legendgrouptitle if legendgrouptitle is not None else _v
3056+
if _v is not None:
3057+
self["legendgrouptitle"] = _v
29863058
_v = arg.pop("legendrank", None)
29873059
_v = legendrank if legendrank is not None else _v
29883060
if _v is not None:

packages/python/plotly/plotly/graph_objs/_barpolar.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Barpolar(_BaseTraceType):
2525
"ids",
2626
"idssrc",
2727
"legendgroup",
28+
"legendgrouptitle",
2829
"legendrank",
2930
"marker",
3031
"meta",
@@ -462,6 +463,34 @@ def legendgroup(self):
462463
def legendgroup(self, val):
463464
self["legendgroup"] = val
464465

466+
# legendgrouptitle
467+
# ----------------
468+
@property
469+
def legendgrouptitle(self):
470+
"""
471+
The 'legendgrouptitle' property is an instance of Legendgrouptitle
472+
that may be specified as:
473+
- An instance of :class:`plotly.graph_objs.barpolar.Legendgrouptitle`
474+
- A dict of string/value properties that will be passed
475+
to the Legendgrouptitle constructor
476+
477+
Supported dict properties:
478+
479+
font
480+
Sets this legend group's title font.
481+
text
482+
Sets the title of the legend group.
483+
484+
Returns
485+
-------
486+
plotly.graph_objs.barpolar.Legendgrouptitle
487+
"""
488+
return self["legendgrouptitle"]
489+
490+
@legendgrouptitle.setter
491+
def legendgrouptitle(self, val):
492+
self["legendgrouptitle"] = val
493+
465494
# legendrank
466495
# ----------
467496
@property
@@ -1305,6 +1334,9 @@ def _prop_descriptions(self):
13051334
Sets the legend group for this trace. Traces part of
13061335
the same legend group hide/show at the same time when
13071336
toggling legend items.
1337+
legendgrouptitle
1338+
:class:`plotly.graph_objects.barpolar.Legendgrouptitle`
1339+
instance or dict with compatible properties
13081340
legendrank
13091341
Sets the legend rank for this trace. Items and groups
13101342
with smaller ranks are presented on top/left side while
@@ -1449,6 +1481,7 @@ def __init__(
14491481
ids=None,
14501482
idssrc=None,
14511483
legendgroup=None,
1484+
legendgrouptitle=None,
14521485
legendrank=None,
14531486
marker=None,
14541487
meta=None,
@@ -1569,6 +1602,9 @@ def __init__(
15691602
Sets the legend group for this trace. Traces part of
15701603
the same legend group hide/show at the same time when
15711604
toggling legend items.
1605+
legendgrouptitle
1606+
:class:`plotly.graph_objects.barpolar.Legendgrouptitle`
1607+
instance or dict with compatible properties
15721608
legendrank
15731609
Sets the legend rank for this trace. Items and groups
15741610
with smaller ranks are presented on top/left side while
@@ -1790,6 +1826,10 @@ def __init__(
17901826
_v = legendgroup if legendgroup is not None else _v
17911827
if _v is not None:
17921828
self["legendgroup"] = _v
1829+
_v = arg.pop("legendgrouptitle", None)
1830+
_v = legendgrouptitle if legendgrouptitle is not None else _v
1831+
if _v is not None:
1832+
self["legendgrouptitle"] = _v
17931833
_v = arg.pop("legendrank", None)
17941834
_v = legendrank if legendrank is not None else _v
17951835
if _v is not None:

0 commit comments

Comments
 (0)