@@ -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