1from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
2import copy as _copy
3
4
5class Legend(_BaseLayoutHierarchyType):
6
7    # class properties
8    # --------------------
9    _parent_path_str = "layout"
10    _path_str = "layout.legend"
11    _valid_props = {
12        "bgcolor",
13        "bordercolor",
14        "borderwidth",
15        "font",
16        "itemclick",
17        "itemdoubleclick",
18        "itemsizing",
19        "itemwidth",
20        "orientation",
21        "title",
22        "tracegroupgap",
23        "traceorder",
24        "uirevision",
25        "valign",
26        "x",
27        "xanchor",
28        "y",
29        "yanchor",
30    }
31
32    # bgcolor
33    # -------
34    @property
35    def bgcolor(self):
36        """
37        Sets the legend background color. Defaults to
38        `layout.paper_bgcolor`.
39
40        The 'bgcolor' property is a color and may be specified as:
41          - A hex string (e.g. '#ff0000')
42          - An rgb/rgba string (e.g. 'rgb(255,0,0)')
43          - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
44          - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
45          - A named CSS color:
46                aliceblue, antiquewhite, aqua, aquamarine, azure,
47                beige, bisque, black, blanchedalmond, blue,
48                blueviolet, brown, burlywood, cadetblue,
49                chartreuse, chocolate, coral, cornflowerblue,
50                cornsilk, crimson, cyan, darkblue, darkcyan,
51                darkgoldenrod, darkgray, darkgrey, darkgreen,
52                darkkhaki, darkmagenta, darkolivegreen, darkorange,
53                darkorchid, darkred, darksalmon, darkseagreen,
54                darkslateblue, darkslategray, darkslategrey,
55                darkturquoise, darkviolet, deeppink, deepskyblue,
56                dimgray, dimgrey, dodgerblue, firebrick,
57                floralwhite, forestgreen, fuchsia, gainsboro,
58                ghostwhite, gold, goldenrod, gray, grey, green,
59                greenyellow, honeydew, hotpink, indianred, indigo,
60                ivory, khaki, lavender, lavenderblush, lawngreen,
61                lemonchiffon, lightblue, lightcoral, lightcyan,
62                lightgoldenrodyellow, lightgray, lightgrey,
63                lightgreen, lightpink, lightsalmon, lightseagreen,
64                lightskyblue, lightslategray, lightslategrey,
65                lightsteelblue, lightyellow, lime, limegreen,
66                linen, magenta, maroon, mediumaquamarine,
67                mediumblue, mediumorchid, mediumpurple,
68                mediumseagreen, mediumslateblue, mediumspringgreen,
69                mediumturquoise, mediumvioletred, midnightblue,
70                mintcream, mistyrose, moccasin, navajowhite, navy,
71                oldlace, olive, olivedrab, orange, orangered,
72                orchid, palegoldenrod, palegreen, paleturquoise,
73                palevioletred, papayawhip, peachpuff, peru, pink,
74                plum, powderblue, purple, red, rosybrown,
75                royalblue, rebeccapurple, saddlebrown, salmon,
76                sandybrown, seagreen, seashell, sienna, silver,
77                skyblue, slateblue, slategray, slategrey, snow,
78                springgreen, steelblue, tan, teal, thistle, tomato,
79                turquoise, violet, wheat, white, whitesmoke,
80                yellow, yellowgreen
81
82        Returns
83        -------
84        str
85        """
86        return self["bgcolor"]
87
88    @bgcolor.setter
89    def bgcolor(self, val):
90        self["bgcolor"] = val
91
92    # bordercolor
93    # -----------
94    @property
95    def bordercolor(self):
96        """
97        Sets the color of the border enclosing the legend.
98
99        The 'bordercolor' property is a color and may be specified as:
100          - A hex string (e.g. '#ff0000')
101          - An rgb/rgba string (e.g. 'rgb(255,0,0)')
102          - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
103          - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
104          - A named CSS color:
105                aliceblue, antiquewhite, aqua, aquamarine, azure,
106                beige, bisque, black, blanchedalmond, blue,
107                blueviolet, brown, burlywood, cadetblue,
108                chartreuse, chocolate, coral, cornflowerblue,
109                cornsilk, crimson, cyan, darkblue, darkcyan,
110                darkgoldenrod, darkgray, darkgrey, darkgreen,
111                darkkhaki, darkmagenta, darkolivegreen, darkorange,
112                darkorchid, darkred, darksalmon, darkseagreen,
113                darkslateblue, darkslategray, darkslategrey,
114                darkturquoise, darkviolet, deeppink, deepskyblue,
115                dimgray, dimgrey, dodgerblue, firebrick,
116                floralwhite, forestgreen, fuchsia, gainsboro,
117                ghostwhite, gold, goldenrod, gray, grey, green,
118                greenyellow, honeydew, hotpink, indianred, indigo,
119                ivory, khaki, lavender, lavenderblush, lawngreen,
120                lemonchiffon, lightblue, lightcoral, lightcyan,
121                lightgoldenrodyellow, lightgray, lightgrey,
122                lightgreen, lightpink, lightsalmon, lightseagreen,
123                lightskyblue, lightslategray, lightslategrey,
124                lightsteelblue, lightyellow, lime, limegreen,
125                linen, magenta, maroon, mediumaquamarine,
126                mediumblue, mediumorchid, mediumpurple,
127                mediumseagreen, mediumslateblue, mediumspringgreen,
128                mediumturquoise, mediumvioletred, midnightblue,
129                mintcream, mistyrose, moccasin, navajowhite, navy,
130                oldlace, olive, olivedrab, orange, orangered,
131                orchid, palegoldenrod, palegreen, paleturquoise,
132                palevioletred, papayawhip, peachpuff, peru, pink,
133                plum, powderblue, purple, red, rosybrown,
134                royalblue, rebeccapurple, saddlebrown, salmon,
135                sandybrown, seagreen, seashell, sienna, silver,
136                skyblue, slateblue, slategray, slategrey, snow,
137                springgreen, steelblue, tan, teal, thistle, tomato,
138                turquoise, violet, wheat, white, whitesmoke,
139                yellow, yellowgreen
140
141        Returns
142        -------
143        str
144        """
145        return self["bordercolor"]
146
147    @bordercolor.setter
148    def bordercolor(self, val):
149        self["bordercolor"] = val
150
151    # borderwidth
152    # -----------
153    @property
154    def borderwidth(self):
155        """
156        Sets the width (in px) of the border enclosing the legend.
157
158        The 'borderwidth' property is a number and may be specified as:
159          - An int or float in the interval [0, inf]
160
161        Returns
162        -------
163        int|float
164        """
165        return self["borderwidth"]
166
167    @borderwidth.setter
168    def borderwidth(self, val):
169        self["borderwidth"] = val
170
171    # font
172    # ----
173    @property
174    def font(self):
175        """
176        Sets the font used to text the legend items.
177
178        The 'font' property is an instance of Font
179        that may be specified as:
180          - An instance of :class:`plotly.graph_objs.layout.legend.Font`
181          - A dict of string/value properties that will be passed
182            to the Font constructor
183
184            Supported dict properties:
185
186                color
187
188                family
189                    HTML font family - the typeface that will be
190                    applied by the web browser. The web browser
191                    will only be able to apply a font if it is
192                    available on the system which it operates.
193                    Provide multiple font families, separated by
194                    commas, to indicate the preference in which to
195                    apply fonts if they aren't available on the
196                    system. The Chart Studio Cloud (at
197                    https://chart-studio.plotly.com or on-premise)
198                    generates images on a server, where only a
199                    select number of fonts are installed and
200                    supported. These include "Arial", "Balto",
201                    "Courier New", "Droid Sans",, "Droid Serif",
202                    "Droid Sans Mono", "Gravitas One", "Old
203                    Standard TT", "Open Sans", "Overpass", "PT Sans
204                    Narrow", "Raleway", "Times New Roman".
205                size
206
207        Returns
208        -------
209        plotly.graph_objs.layout.legend.Font
210        """
211        return self["font"]
212
213    @font.setter
214    def font(self, val):
215        self["font"] = val
216
217    # itemclick
218    # ---------
219    @property
220    def itemclick(self):
221        """
222        Determines the behavior on legend item click. "toggle" toggles
223        the visibility of the item clicked on the graph. "toggleothers"
224        makes the clicked item the sole visible item on the graph.
225        False disable legend item click interactions.
226
227        The 'itemclick' property is an enumeration that may be specified as:
228          - One of the following enumeration values:
229                ['toggle', 'toggleothers', False]
230
231        Returns
232        -------
233        Any
234        """
235        return self["itemclick"]
236
237    @itemclick.setter
238    def itemclick(self, val):
239        self["itemclick"] = val
240
241    # itemdoubleclick
242    # ---------------
243    @property
244    def itemdoubleclick(self):
245        """
246        Determines the behavior on legend item double-click. "toggle"
247        toggles the visibility of the item clicked on the graph.
248        "toggleothers" makes the clicked item the sole visible item on
249        the graph. False disable legend item double-click interactions.
250
251        The 'itemdoubleclick' property is an enumeration that may be specified as:
252          - One of the following enumeration values:
253                ['toggle', 'toggleothers', False]
254
255        Returns
256        -------
257        Any
258        """
259        return self["itemdoubleclick"]
260
261    @itemdoubleclick.setter
262    def itemdoubleclick(self, val):
263        self["itemdoubleclick"] = val
264
265    # itemsizing
266    # ----------
267    @property
268    def itemsizing(self):
269        """
270        Determines if the legend items symbols scale with their
271        corresponding "trace" attributes or remain "constant"
272        independent of the symbol size on the graph.
273
274        The 'itemsizing' property is an enumeration that may be specified as:
275          - One of the following enumeration values:
276                ['trace', 'constant']
277
278        Returns
279        -------
280        Any
281        """
282        return self["itemsizing"]
283
284    @itemsizing.setter
285    def itemsizing(self, val):
286        self["itemsizing"] = val
287
288    # itemwidth
289    # ---------
290    @property
291    def itemwidth(self):
292        """
293        Sets the width (in px) of the legend item symbols (the part
294        other than the title.text).
295
296        The 'itemwidth' property is a number and may be specified as:
297          - An int or float in the interval [30, inf]
298
299        Returns
300        -------
301        int|float
302        """
303        return self["itemwidth"]
304
305    @itemwidth.setter
306    def itemwidth(self, val):
307        self["itemwidth"] = val
308
309    # orientation
310    # -----------
311    @property
312    def orientation(self):
313        """
314        Sets the orientation of the legend.
315
316        The 'orientation' property is an enumeration that may be specified as:
317          - One of the following enumeration values:
318                ['v', 'h']
319
320        Returns
321        -------
322        Any
323        """
324        return self["orientation"]
325
326    @orientation.setter
327    def orientation(self, val):
328        self["orientation"] = val
329
330    # title
331    # -----
332    @property
333    def title(self):
334        """
335        The 'title' property is an instance of Title
336        that may be specified as:
337          - An instance of :class:`plotly.graph_objs.layout.legend.Title`
338          - A dict of string/value properties that will be passed
339            to the Title constructor
340
341            Supported dict properties:
342
343                font
344                    Sets this legend's title font.
345                side
346                    Determines the location of legend's title with
347                    respect to the legend items. Defaulted to "top"
348                    with `orientation` is "h". Defaulted to "left"
349                    with `orientation` is "v". The *top left*
350                    options could be used to expand legend area in
351                    both x and y sides.
352                text
353                    Sets the title of the legend.
354
355        Returns
356        -------
357        plotly.graph_objs.layout.legend.Title
358        """
359        return self["title"]
360
361    @title.setter
362    def title(self, val):
363        self["title"] = val
364
365    # tracegroupgap
366    # -------------
367    @property
368    def tracegroupgap(self):
369        """
370        Sets the amount of vertical space (in px) between legend
371        groups.
372
373        The 'tracegroupgap' property is a number and may be specified as:
374          - An int or float in the interval [0, inf]
375
376        Returns
377        -------
378        int|float
379        """
380        return self["tracegroupgap"]
381
382    @tracegroupgap.setter
383    def tracegroupgap(self, val):
384        self["tracegroupgap"] = val
385
386    # traceorder
387    # ----------
388    @property
389    def traceorder(self):
390        """
391        Determines the order at which the legend items are displayed.
392        If "normal", the items are displayed top-to-bottom in the same
393        order as the input data. If "reversed", the items are displayed
394        in the opposite order as "normal". If "grouped", the items are
395        displayed in groups (when a trace `legendgroup` is provided).
396        if "grouped+reversed", the items are displayed in the opposite
397        order as "grouped".
398
399        The 'traceorder' property is a flaglist and may be specified
400        as a string containing:
401          - Any combination of ['reversed', 'grouped'] joined with '+' characters
402            (e.g. 'reversed+grouped')
403            OR exactly one of ['normal'] (e.g. 'normal')
404
405        Returns
406        -------
407        Any
408        """
409        return self["traceorder"]
410
411    @traceorder.setter
412    def traceorder(self, val):
413        self["traceorder"] = val
414
415    # uirevision
416    # ----------
417    @property
418    def uirevision(self):
419        """
420        Controls persistence of legend-driven changes in trace and pie
421        label visibility. Defaults to `layout.uirevision`.
422
423        The 'uirevision' property accepts values of any type
424
425        Returns
426        -------
427        Any
428        """
429        return self["uirevision"]
430
431    @uirevision.setter
432    def uirevision(self, val):
433        self["uirevision"] = val
434
435    # valign
436    # ------
437    @property
438    def valign(self):
439        """
440        Sets the vertical alignment of the symbols with respect to
441        their associated text.
442
443        The 'valign' property is an enumeration that may be specified as:
444          - One of the following enumeration values:
445                ['top', 'middle', 'bottom']
446
447        Returns
448        -------
449        Any
450        """
451        return self["valign"]
452
453    @valign.setter
454    def valign(self, val):
455        self["valign"] = val
456
457    # x
458    # -
459    @property
460    def x(self):
461        """
462        Sets the x position (in normalized coordinates) of the legend.
463        Defaults to 1.02 for vertical legends and defaults to 0 for
464        horizontal legends.
465
466        The 'x' property is a number and may be specified as:
467          - An int or float in the interval [-2, 3]
468
469        Returns
470        -------
471        int|float
472        """
473        return self["x"]
474
475    @x.setter
476    def x(self, val):
477        self["x"] = val
478
479    # xanchor
480    # -------
481    @property
482    def xanchor(self):
483        """
484        Sets the legend's horizontal position anchor. This anchor binds
485        the `x` position to the "left", "center" or "right" of the
486        legend. Value "auto" anchors legends to the right for `x`
487        values greater than or equal to 2/3, anchors legends to the
488        left for `x` values less than or equal to 1/3 and anchors
489        legends with respect to their center otherwise.
490
491        The 'xanchor' property is an enumeration that may be specified as:
492          - One of the following enumeration values:
493                ['auto', 'left', 'center', 'right']
494
495        Returns
496        -------
497        Any
498        """
499        return self["xanchor"]
500
501    @xanchor.setter
502    def xanchor(self, val):
503        self["xanchor"] = val
504
505    # y
506    # -
507    @property
508    def y(self):
509        """
510        Sets the y position (in normalized coordinates) of the legend.
511        Defaults to 1 for vertical legends, defaults to "-0.1" for
512        horizontal legends on graphs w/o range sliders and defaults to
513        1.1 for horizontal legends on graph with one or multiple range
514        sliders.
515
516        The 'y' property is a number and may be specified as:
517          - An int or float in the interval [-2, 3]
518
519        Returns
520        -------
521        int|float
522        """
523        return self["y"]
524
525    @y.setter
526    def y(self, val):
527        self["y"] = val
528
529    # yanchor
530    # -------
531    @property
532    def yanchor(self):
533        """
534        Sets the legend's vertical position anchor This anchor binds
535        the `y` position to the "top", "middle" or "bottom" of the
536        legend. Value "auto" anchors legends at their bottom for `y`
537        values less than or equal to 1/3, anchors legends to at their
538        top for `y` values greater than or equal to 2/3 and anchors
539        legends with respect to their middle otherwise.
540
541        The 'yanchor' property is an enumeration that may be specified as:
542          - One of the following enumeration values:
543                ['auto', 'top', 'middle', 'bottom']
544
545        Returns
546        -------
547        Any
548        """
549        return self["yanchor"]
550
551    @yanchor.setter
552    def yanchor(self, val):
553        self["yanchor"] = val
554
555    # Self properties description
556    # ---------------------------
557    @property
558    def _prop_descriptions(self):
559        return """\
560        bgcolor
561            Sets the legend background color. Defaults to
562            `layout.paper_bgcolor`.
563        bordercolor
564            Sets the color of the border enclosing the legend.
565        borderwidth
566            Sets the width (in px) of the border enclosing the
567            legend.
568        font
569            Sets the font used to text the legend items.
570        itemclick
571            Determines the behavior on legend item click. "toggle"
572            toggles the visibility of the item clicked on the
573            graph. "toggleothers" makes the clicked item the sole
574            visible item on the graph. False disable legend item
575            click interactions.
576        itemdoubleclick
577            Determines the behavior on legend item double-click.
578            "toggle" toggles the visibility of the item clicked on
579            the graph. "toggleothers" makes the clicked item the
580            sole visible item on the graph. False disable legend
581            item double-click interactions.
582        itemsizing
583            Determines if the legend items symbols scale with their
584            corresponding "trace" attributes or remain "constant"
585            independent of the symbol size on the graph.
586        itemwidth
587            Sets the width (in px) of the legend item symbols (the
588            part other than the title.text).
589        orientation
590            Sets the orientation of the legend.
591        title
592            :class:`plotly.graph_objects.layout.legend.Title`
593            instance or dict with compatible properties
594        tracegroupgap
595            Sets the amount of vertical space (in px) between
596            legend groups.
597        traceorder
598            Determines the order at which the legend items are
599            displayed. If "normal", the items are displayed top-to-
600            bottom in the same order as the input data. If
601            "reversed", the items are displayed in the opposite
602            order as "normal". If "grouped", the items are
603            displayed in groups (when a trace `legendgroup` is
604            provided). if "grouped+reversed", the items are
605            displayed in the opposite order as "grouped".
606        uirevision
607            Controls persistence of legend-driven changes in trace
608            and pie label visibility. Defaults to
609            `layout.uirevision`.
610        valign
611            Sets the vertical alignment of the symbols with respect
612            to their associated text.
613        x
614            Sets the x position (in normalized coordinates) of the
615            legend. Defaults to 1.02 for vertical legends and
616            defaults to 0 for horizontal legends.
617        xanchor
618            Sets the legend's horizontal position anchor. This
619            anchor binds the `x` position to the "left", "center"
620            or "right" of the legend. Value "auto" anchors legends
621            to the right for `x` values greater than or equal to
622            2/3, anchors legends to the left for `x` values less
623            than or equal to 1/3 and anchors legends with respect
624            to their center otherwise.
625        y
626            Sets the y position (in normalized coordinates) of the
627            legend. Defaults to 1 for vertical legends, defaults to
628            "-0.1" for horizontal legends on graphs w/o range
629            sliders and defaults to 1.1 for horizontal legends on
630            graph with one or multiple range sliders.
631        yanchor
632            Sets the legend's vertical position anchor This anchor
633            binds the `y` position to the "top", "middle" or
634            "bottom" of the legend. Value "auto" anchors legends at
635            their bottom for `y` values less than or equal to 1/3,
636            anchors legends to at their top for `y` values greater
637            than or equal to 2/3 and anchors legends with respect
638            to their middle otherwise.
639        """
640
641    def __init__(
642        self,
643        arg=None,
644        bgcolor=None,
645        bordercolor=None,
646        borderwidth=None,
647        font=None,
648        itemclick=None,
649        itemdoubleclick=None,
650        itemsizing=None,
651        itemwidth=None,
652        orientation=None,
653        title=None,
654        tracegroupgap=None,
655        traceorder=None,
656        uirevision=None,
657        valign=None,
658        x=None,
659        xanchor=None,
660        y=None,
661        yanchor=None,
662        **kwargs
663    ):
664        """
665        Construct a new Legend object
666
667        Parameters
668        ----------
669        arg
670            dict of properties compatible with this constructor or
671            an instance of :class:`plotly.graph_objs.layout.Legend`
672        bgcolor
673            Sets the legend background color. Defaults to
674            `layout.paper_bgcolor`.
675        bordercolor
676            Sets the color of the border enclosing the legend.
677        borderwidth
678            Sets the width (in px) of the border enclosing the
679            legend.
680        font
681            Sets the font used to text the legend items.
682        itemclick
683            Determines the behavior on legend item click. "toggle"
684            toggles the visibility of the item clicked on the
685            graph. "toggleothers" makes the clicked item the sole
686            visible item on the graph. False disable legend item
687            click interactions.
688        itemdoubleclick
689            Determines the behavior on legend item double-click.
690            "toggle" toggles the visibility of the item clicked on
691            the graph. "toggleothers" makes the clicked item the
692            sole visible item on the graph. False disable legend
693            item double-click interactions.
694        itemsizing
695            Determines if the legend items symbols scale with their
696            corresponding "trace" attributes or remain "constant"
697            independent of the symbol size on the graph.
698        itemwidth
699            Sets the width (in px) of the legend item symbols (the
700            part other than the title.text).
701        orientation
702            Sets the orientation of the legend.
703        title
704            :class:`plotly.graph_objects.layout.legend.Title`
705            instance or dict with compatible properties
706        tracegroupgap
707            Sets the amount of vertical space (in px) between
708            legend groups.
709        traceorder
710            Determines the order at which the legend items are
711            displayed. If "normal", the items are displayed top-to-
712            bottom in the same order as the input data. If
713            "reversed", the items are displayed in the opposite
714            order as "normal". If "grouped", the items are
715            displayed in groups (when a trace `legendgroup` is
716            provided). if "grouped+reversed", the items are
717            displayed in the opposite order as "grouped".
718        uirevision
719            Controls persistence of legend-driven changes in trace
720            and pie label visibility. Defaults to
721            `layout.uirevision`.
722        valign
723            Sets the vertical alignment of the symbols with respect
724            to their associated text.
725        x
726            Sets the x position (in normalized coordinates) of the
727            legend. Defaults to 1.02 for vertical legends and
728            defaults to 0 for horizontal legends.
729        xanchor
730            Sets the legend's horizontal position anchor. This
731            anchor binds the `x` position to the "left", "center"
732            or "right" of the legend. Value "auto" anchors legends
733            to the right for `x` values greater than or equal to
734            2/3, anchors legends to the left for `x` values less
735            than or equal to 1/3 and anchors legends with respect
736            to their center otherwise.
737        y
738            Sets the y position (in normalized coordinates) of the
739            legend. Defaults to 1 for vertical legends, defaults to
740            "-0.1" for horizontal legends on graphs w/o range
741            sliders and defaults to 1.1 for horizontal legends on
742            graph with one or multiple range sliders.
743        yanchor
744            Sets the legend's vertical position anchor This anchor
745            binds the `y` position to the "top", "middle" or
746            "bottom" of the legend. Value "auto" anchors legends at
747            their bottom for `y` values less than or equal to 1/3,
748            anchors legends to at their top for `y` values greater
749            than or equal to 2/3 and anchors legends with respect
750            to their middle otherwise.
751
752        Returns
753        -------
754        Legend
755        """
756        super(Legend, self).__init__("legend")
757
758        if "_parent" in kwargs:
759            self._parent = kwargs["_parent"]
760            return
761
762        # Validate arg
763        # ------------
764        if arg is None:
765            arg = {}
766        elif isinstance(arg, self.__class__):
767            arg = arg.to_plotly_json()
768        elif isinstance(arg, dict):
769            arg = _copy.copy(arg)
770        else:
771            raise ValueError(
772                """\
773The first argument to the plotly.graph_objs.layout.Legend
774constructor must be a dict or
775an instance of :class:`plotly.graph_objs.layout.Legend`"""
776            )
777
778        # Handle skip_invalid
779        # -------------------
780        self._skip_invalid = kwargs.pop("skip_invalid", False)
781        self._validate = kwargs.pop("_validate", True)
782
783        # Populate data dict with properties
784        # ----------------------------------
785        _v = arg.pop("bgcolor", None)
786        _v = bgcolor if bgcolor is not None else _v
787        if _v is not None:
788            self["bgcolor"] = _v
789        _v = arg.pop("bordercolor", None)
790        _v = bordercolor if bordercolor is not None else _v
791        if _v is not None:
792            self["bordercolor"] = _v
793        _v = arg.pop("borderwidth", None)
794        _v = borderwidth if borderwidth is not None else _v
795        if _v is not None:
796            self["borderwidth"] = _v
797        _v = arg.pop("font", None)
798        _v = font if font is not None else _v
799        if _v is not None:
800            self["font"] = _v
801        _v = arg.pop("itemclick", None)
802        _v = itemclick if itemclick is not None else _v
803        if _v is not None:
804            self["itemclick"] = _v
805        _v = arg.pop("itemdoubleclick", None)
806        _v = itemdoubleclick if itemdoubleclick is not None else _v
807        if _v is not None:
808            self["itemdoubleclick"] = _v
809        _v = arg.pop("itemsizing", None)
810        _v = itemsizing if itemsizing is not None else _v
811        if _v is not None:
812            self["itemsizing"] = _v
813        _v = arg.pop("itemwidth", None)
814        _v = itemwidth if itemwidth is not None else _v
815        if _v is not None:
816            self["itemwidth"] = _v
817        _v = arg.pop("orientation", None)
818        _v = orientation if orientation is not None else _v
819        if _v is not None:
820            self["orientation"] = _v
821        _v = arg.pop("title", None)
822        _v = title if title is not None else _v
823        if _v is not None:
824            self["title"] = _v
825        _v = arg.pop("tracegroupgap", None)
826        _v = tracegroupgap if tracegroupgap is not None else _v
827        if _v is not None:
828            self["tracegroupgap"] = _v
829        _v = arg.pop("traceorder", None)
830        _v = traceorder if traceorder is not None else _v
831        if _v is not None:
832            self["traceorder"] = _v
833        _v = arg.pop("uirevision", None)
834        _v = uirevision if uirevision is not None else _v
835        if _v is not None:
836            self["uirevision"] = _v
837        _v = arg.pop("valign", None)
838        _v = valign if valign is not None else _v
839        if _v is not None:
840            self["valign"] = _v
841        _v = arg.pop("x", None)
842        _v = x if x is not None else _v
843        if _v is not None:
844            self["x"] = _v
845        _v = arg.pop("xanchor", None)
846        _v = xanchor if xanchor is not None else _v
847        if _v is not None:
848            self["xanchor"] = _v
849        _v = arg.pop("y", None)
850        _v = y if y is not None else _v
851        if _v is not None:
852            self["y"] = _v
853        _v = arg.pop("yanchor", None)
854        _v = yanchor if yanchor is not None else _v
855        if _v is not None:
856            self["yanchor"] = _v
857
858        # Process unknown kwargs
859        # ----------------------
860        self._process_kwargs(**dict(arg, **kwargs))
861
862        # Reset skip_invalid
863        # ------------------
864        self._skip_invalid = False
865