forked from plotly/plotly.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_legend.py
62 lines (59 loc) · 2.5 KB
/
_legend.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import _plotly_utils.basevalidators
class LegendValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name='legend', parent_name='layout', **kwargs):
super(LegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_class_str=kwargs.pop('data_class_str', 'Legend'),
data_docs=kwargs.pop(
'data_docs', """
bgcolor
Sets the legend background color.
bordercolor
Sets the color of the border enclosing the
legend.
borderwidth
Sets the width (in px) of the border enclosing
the legend.
font
Sets the font used to text the legend items.
orientation
Sets the orientation of the legend.
tracegroupgap
Sets the amount of vertical space (in px)
between legend groups.
traceorder
Determines the order at which the legend items
are displayed. If "normal", the items are
displayed top-to-bottom in the same order as
the input data. If "reversed", the items are
displayed in the opposite order as "normal". If
"grouped", the items are displayed in groups
(when a trace `legendgroup` is provided). if
"grouped+reversed", the items are displayed in
the opposite order as "grouped".
uirevision
Controls persistence of legend-driven changes
in trace and pie label visibility. Defaults to
`layout.uirevision`.
valign
Sets the vertical alignment of the symbols with
respect to their associated text.
x
Sets the x position (in normalized coordinates)
of the legend.
xanchor
Sets the legend's horizontal position anchor.
This anchor binds the `x` position to the
"left", "center" or "right" of the legend.
y
Sets the y position (in normalized coordinates)
of the legend.
yanchor
Sets the legend's vertical position anchor This
anchor binds the `y` position to the "top",
"middle" or "bottom" of the legend.
"""
),
**kwargs
)