Skip to content

Commit 03fd2ed

Browse files
authored
Merge pull request #5527 from plotly/update-plotlyjs-3.4.0
upgrade plotly.js to v3.4.0
2 parents 21df906 + aee4c33 commit 03fd2ed

File tree

26 files changed

+1588
-618
lines changed

26 files changed

+1588
-618
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
### Updated
8+
- Update plotly.js from version 3.3.1 to version 3.4.0. See the plotly.js [release notes](https://github.com/plotly/plotly.js/releases/tag/v3.4.0) for more information. [[#5527](https://github.com/plotly/plotly.py/pull/5527)]. Notable changes include:
9+
- Add support for clicking legend titles to toggle visibility of all traces in legend [[#7698](https://github.com/plotly/plotly.js/pull/7698)]
10+
- Add support for shapes to reference multiple axes [[#7666](https://github.com/plotly/plotly.js/pull/7666)]
11+
- Add support for dashed marker lines in scatter plots [[#7673](https://github.com/plotly/plotly.js/pull/7673)]
12+
- Increase axis autorange when bar charts have outside text labels, to avoid labels being clipped [[#7675](https://github.com/plotly/plotly.js/pull/7675)]
13+
714
## [6.5.2] - 2026-01-14
815

916
### Fixed

codegen/resources/plot-schema.json

Lines changed: 158 additions & 6 deletions
Large diffs are not rendered by default.

js/lib/mimeExtension.js

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

js/package-lock.json

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

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"dependencies": {
2121
"lodash-es": "^4.17.21",
22-
"plotly.js": "3.3.1",
22+
"plotly.js": "3.4.0",
2323
"@lumino/widgets": "~2.4.0"
2424
},
2525
"devDependencies": {

plotly/graph_objs/_figure.py

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25072,13 +25072,15 @@ def add_shape(
2507225072
x1shift=None,
2507325073
xanchor=None,
2507425074
xref=None,
25075+
xrefsrc=None,
2507525076
xsizemode=None,
2507625077
y0=None,
2507725078
y0shift=None,
2507825079
y1=None,
2507925080
y1shift=None,
2508025081
yanchor=None,
2508125082
yref=None,
25083+
yrefsrc=None,
2508225084
ysizemode=None,
2508325085
row=None,
2508425086
col=None,
@@ -25243,7 +25245,15 @@ def add_shape(
2524325245
domain of that axis: e.g., *x2 domain* refers to the
2524425246
domain of the second x axis and a x position of 0.5
2524525247
refers to the point between the left and the right of
25246-
the domain of the second x axis.
25248+
the domain of the second x axis. If an array of axis
25249+
IDs is provided, each `x` value will refer to the
25250+
corresponding axis, e.g., ['x', 'x2'] for a rectangle,
25251+
line, or circle means `x0` uses the `x` axis and `x1`
25252+
uses the `x2` axis. Path shapes using an array should
25253+
have one entry for each x coordinate in the string.
25254+
xrefsrc
25255+
Sets the source reference on Chart Studio Cloud for
25256+
`xref`.
2524725257
xsizemode
2524825258
Sets the shapes's sizing mode along the x axis. If set
2524925259
to "scaled", `x0`, `x1` and x coordinates within `path`
@@ -25253,7 +25263,9 @@ def add_shape(
2525325263
data or plot fraction but `x0`, `x1` and x coordinates
2525425264
within `path` are pixels relative to `xanchor`. This
2525525265
way, the shape can have a fixed width while maintaining
25256-
a position relative to data or plot fraction.
25266+
a position relative to data or plot fraction. Note:
25267+
`xsizemode` "pixel" is not supported when `xref` is an
25268+
array.
2525725269
y0
2525825270
Sets the shape's starting y position. See `type` and
2525925271
`ysizemode` for more info.
@@ -25290,7 +25302,15 @@ def add_shape(
2529025302
domain of that axis: e.g., *y2 domain* refers to the
2529125303
domain of the second y axis and a y position of 0.5
2529225304
refers to the point between the bottom and the top of
25293-
the domain of the second y axis.
25305+
the domain of the second y axis. If an array of axis
25306+
IDs is provided, each `y` value will refer to the
25307+
corresponding axis, e.g., ['y', 'y2'] for a rectangle,
25308+
line, or circle means `y0` uses the `y` axis and `y1`
25309+
uses the `y2` axis. Path shapes using an array should
25310+
have one entry for each y coordinate in the string.
25311+
yrefsrc
25312+
Sets the source reference on Chart Studio Cloud for
25313+
`yref`.
2529425314
ysizemode
2529525315
Sets the shapes's sizing mode along the y axis. If set
2529625316
to "scaled", `y0`, `y1` and y coordinates within `path`
@@ -25301,7 +25321,8 @@ def add_shape(
2530125321
within `path` are pixels relative to `yanchor`. This
2530225322
way, the shape can have a fixed height while
2530325323
maintaining a position relative to data or plot
25304-
fraction.
25324+
fraction. Note: `ysizemode` "pixel" is not supported
25325+
when `yref` is an array.
2530525326
row
2530625327
Subplot row for shape. If 'all', addresses all rows in
2530725328
the specified column(s).
@@ -25346,13 +25367,15 @@ def add_shape(
2534625367
x1shift=x1shift,
2534725368
xanchor=xanchor,
2534825369
xref=xref,
25370+
xrefsrc=xrefsrc,
2534925371
xsizemode=xsizemode,
2535025372
y0=y0,
2535125373
y0shift=y0shift,
2535225374
y1=y1,
2535325375
y1shift=y1shift,
2535425376
yanchor=yanchor,
2535525377
yref=yref,
25378+
yrefsrc=yrefsrc,
2535625379
ysizemode=ysizemode,
2535725380
**kwargs,
2535825381
)

plotly/graph_objs/_figurewidget.py

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25076,13 +25076,15 @@ def add_shape(
2507625076
x1shift=None,
2507725077
xanchor=None,
2507825078
xref=None,
25079+
xrefsrc=None,
2507925080
xsizemode=None,
2508025081
y0=None,
2508125082
y0shift=None,
2508225083
y1=None,
2508325084
y1shift=None,
2508425085
yanchor=None,
2508525086
yref=None,
25087+
yrefsrc=None,
2508625088
ysizemode=None,
2508725089
row=None,
2508825090
col=None,
@@ -25247,7 +25249,15 @@ def add_shape(
2524725249
domain of that axis: e.g., *x2 domain* refers to the
2524825250
domain of the second x axis and a x position of 0.5
2524925251
refers to the point between the left and the right of
25250-
the domain of the second x axis.
25252+
the domain of the second x axis. If an array of axis
25253+
IDs is provided, each `x` value will refer to the
25254+
corresponding axis, e.g., ['x', 'x2'] for a rectangle,
25255+
line, or circle means `x0` uses the `x` axis and `x1`
25256+
uses the `x2` axis. Path shapes using an array should
25257+
have one entry for each x coordinate in the string.
25258+
xrefsrc
25259+
Sets the source reference on Chart Studio Cloud for
25260+
`xref`.
2525125261
xsizemode
2525225262
Sets the shapes's sizing mode along the x axis. If set
2525325263
to "scaled", `x0`, `x1` and x coordinates within `path`
@@ -25257,7 +25267,9 @@ def add_shape(
2525725267
data or plot fraction but `x0`, `x1` and x coordinates
2525825268
within `path` are pixels relative to `xanchor`. This
2525925269
way, the shape can have a fixed width while maintaining
25260-
a position relative to data or plot fraction.
25270+
a position relative to data or plot fraction. Note:
25271+
`xsizemode` "pixel" is not supported when `xref` is an
25272+
array.
2526125273
y0
2526225274
Sets the shape's starting y position. See `type` and
2526325275
`ysizemode` for more info.
@@ -25294,7 +25306,15 @@ def add_shape(
2529425306
domain of that axis: e.g., *y2 domain* refers to the
2529525307
domain of the second y axis and a y position of 0.5
2529625308
refers to the point between the bottom and the top of
25297-
the domain of the second y axis.
25309+
the domain of the second y axis. If an array of axis
25310+
IDs is provided, each `y` value will refer to the
25311+
corresponding axis, e.g., ['y', 'y2'] for a rectangle,
25312+
line, or circle means `y0` uses the `y` axis and `y1`
25313+
uses the `y2` axis. Path shapes using an array should
25314+
have one entry for each y coordinate in the string.
25315+
yrefsrc
25316+
Sets the source reference on Chart Studio Cloud for
25317+
`yref`.
2529825318
ysizemode
2529925319
Sets the shapes's sizing mode along the y axis. If set
2530025320
to "scaled", `y0`, `y1` and y coordinates within `path`
@@ -25305,7 +25325,8 @@ def add_shape(
2530525325
within `path` are pixels relative to `yanchor`. This
2530625326
way, the shape can have a fixed height while
2530725327
maintaining a position relative to data or plot
25308-
fraction.
25328+
fraction. Note: `ysizemode` "pixel" is not supported
25329+
when `yref` is an array.
2530925330
row
2531025331
Subplot row for shape. If 'all', addresses all rows in
2531125332
the specified column(s).
@@ -25350,13 +25371,15 @@ def add_shape(
2535025371
x1shift=x1shift,
2535125372
xanchor=xanchor,
2535225373
xref=xref,
25374+
xrefsrc=xrefsrc,
2535325375
xsizemode=xsizemode,
2535425376
y0=y0,
2535525377
y0shift=y0shift,
2535625378
y1=y1,
2535725379
y1shift=y1shift,
2535825380
yanchor=yanchor,
2535925381
yref=yref,
25382+
yrefsrc=yrefsrc,
2536025383
ysizemode=ysizemode,
2536125384
**kwargs,
2536225385
)

plotly/graph_objs/layout/_legend.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class Legend(_BaseLayoutHierarchyType):
2525
"maxheight",
2626
"orientation",
2727
"title",
28+
"titleclick",
29+
"titledoubleclick",
2830
"tracegroupgap",
2931
"traceorder",
3032
"uirevision",
@@ -373,6 +375,55 @@ def title(self):
373375
def title(self, val):
374376
self["title"] = val
375377

378+
@property
379+
def titleclick(self):
380+
"""
381+
Determines the behavior on legend title click. "toggle" toggles
382+
the visibility of all items in the legend. "toggleothers"
383+
toggles the visibility of all other legends. False disables
384+
legend title click interactions. Defaults to "toggle" when
385+
there are multiple legends, False otherwise. Not supported for
386+
legends containing pie and pie-like traces.
387+
388+
The 'titleclick' property is an enumeration that may be specified as:
389+
- One of the following enumeration values:
390+
['toggle', 'toggleothers', False]
391+
392+
Returns
393+
-------
394+
Any
395+
"""
396+
return self["titleclick"]
397+
398+
@titleclick.setter
399+
def titleclick(self, val):
400+
self["titleclick"] = val
401+
402+
@property
403+
def titledoubleclick(self):
404+
"""
405+
Determines the behavior on legend title double-click. "toggle"
406+
toggles the visibility of all items in the legend.
407+
"toggleothers" toggles the visibility of all other legends.
408+
False disables legend title double-click interactions. Defaults
409+
to "toggleothers" when there are multiple legends, False
410+
otherwise. Not supported for legends containing pie and pie-
411+
like traces.
412+
413+
The 'titledoubleclick' property is an enumeration that may be specified as:
414+
- One of the following enumeration values:
415+
['toggle', 'toggleothers', False]
416+
417+
Returns
418+
-------
419+
Any
420+
"""
421+
return self["titledoubleclick"]
422+
423+
@titledoubleclick.setter
424+
def titledoubleclick(self, val):
425+
self["titledoubleclick"] = val
426+
376427
@property
377428
def tracegroupgap(self):
378429
"""
@@ -680,6 +731,22 @@ def _prop_descriptions(self):
680731
title
681732
:class:`plotly.graph_objects.layout.legend.Title`
682733
instance or dict with compatible properties
734+
titleclick
735+
Determines the behavior on legend title click. "toggle"
736+
toggles the visibility of all items in the legend.
737+
"toggleothers" toggles the visibility of all other
738+
legends. False disables legend title click
739+
interactions. Defaults to "toggle" when there are
740+
multiple legends, False otherwise. Not supported for
741+
legends containing pie and pie-like traces.
742+
titledoubleclick
743+
Determines the behavior on legend title double-click.
744+
"toggle" toggles the visibility of all items in the
745+
legend. "toggleothers" toggles the visibility of all
746+
other legends. False disables legend title double-click
747+
interactions. Defaults to "toggleothers" when there are
748+
multiple legends, False otherwise. Not supported for
749+
legends containing pie and pie-like traces.
683750
tracegroupgap
684751
Sets the amount of vertical space (in px) between
685752
legend groups.
@@ -765,6 +832,8 @@ def __init__(
765832
maxheight=None,
766833
orientation=None,
767834
title=None,
835+
titleclick=None,
836+
titledoubleclick=None,
768837
tracegroupgap=None,
769838
traceorder=None,
770839
uirevision=None,
@@ -849,6 +918,22 @@ def __init__(
849918
title
850919
:class:`plotly.graph_objects.layout.legend.Title`
851920
instance or dict with compatible properties
921+
titleclick
922+
Determines the behavior on legend title click. "toggle"
923+
toggles the visibility of all items in the legend.
924+
"toggleothers" toggles the visibility of all other
925+
legends. False disables legend title click
926+
interactions. Defaults to "toggle" when there are
927+
multiple legends, False otherwise. Not supported for
928+
legends containing pie and pie-like traces.
929+
titledoubleclick
930+
Determines the behavior on legend title double-click.
931+
"toggle" toggles the visibility of all items in the
932+
legend. "toggleothers" toggles the visibility of all
933+
other legends. False disables legend title double-click
934+
interactions. Defaults to "toggleothers" when there are
935+
multiple legends, False otherwise. Not supported for
936+
legends containing pie and pie-like traces.
852937
tracegroupgap
853938
Sets the amount of vertical space (in px) between
854939
legend groups.
@@ -954,6 +1039,8 @@ def __init__(
9541039
self._set_property("maxheight", arg, maxheight)
9551040
self._set_property("orientation", arg, orientation)
9561041
self._set_property("title", arg, title)
1042+
self._set_property("titleclick", arg, titleclick)
1043+
self._set_property("titledoubleclick", arg, titledoubleclick)
9571044
self._set_property("tracegroupgap", arg, tracegroupgap)
9581045
self._set_property("traceorder", arg, traceorder)
9591046
self._set_property("uirevision", arg, uirevision)

0 commit comments

Comments
 (0)