forked from plotly/plotly.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_parcats.py
128 lines (125 loc) · 6.02 KB
/
_parcats.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import _plotly_utils.basevalidators
class ParcatsValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name='parcats', parent_name='', **kwargs):
super(ParcatsValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_class_str=kwargs.pop('data_class_str', 'Parcats'),
data_docs=kwargs.pop(
'data_docs', """
arrangement
Sets the drag interaction mode for categories
and dimensions. If `perpendicular`, the
categories can only move along a line
perpendicular to the paths. If `freeform`, the
categories can freely move on the plane. If
`fixed`, the categories and dimensions are
stationary.
bundlecolors
Sort paths so that like colors are bundled
together within each category.
counts
The number of observations represented by each
state. Defaults to 1 so that each state
represents one observation
countssrc
Sets the source reference on plot.ly for
counts .
dimensions
The dimensions (variables) of the parallel
categories diagram.
dimensiondefaults
When used in a template (as layout.template.dat
a.parcats.dimensiondefaults), sets the default
property values to use for elements of
parcats.dimensions
domain
plotly.graph_objs.parcats.Domain instance or
dict with compatible properties
hoverinfo
Determines which trace information appear on
hover. If `none` or `skip` are set, no
information is displayed upon hovering. But, if
`none` is set, click and hover events are still
fired.
hoveron
Sets the hover interaction mode for the parcats
diagram. If `category`, hover interaction take
place per category. If `color`, hover
interactions take place per color per category.
If `dimension`, hover interactions take place
across all categories per dimension.
hovertemplate
Template string used for rendering the
information that appear on hover box. Note that
this will override `hoverinfo`. Variables are
inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's
syntax %{variable:d3-format}, for example
"Price: %{y:$.2f}". See https://github.com/d3/d
3-format/blob/master/README.md#locale_format
for details on the formatting syntax. The
variables available in `hovertemplate` are the
ones emitted as event data described at this
link https://plot.ly/javascript/plotlyjs-
events/#event-data. Additionally, every
attributes that can be specified per-point (the
ones that are `arrayOk: true`) are available.
variables `count`, `probability`, `category`,
`categorycount`, `colorcount` and
`bandcolorcount`. Anything contained in tag
`<extra>` is displayed in the secondary box,
for example "<extra>{fullData.name}</extra>".
labelfont
Sets the font for the `dimension` labels.
line
plotly.graph_objs.parcats.Line instance or dict
with compatible properties
name
Sets the trace name. The trace name appear as
the legend item and on hover.
sortpaths
Sets the path sorting algorithm. If `forward`,
sort paths based on dimension categories from
left to right. If `backward`, sort paths based
on dimensions categories from right to left.
stream
plotly.graph_objs.parcats.Stream instance or
dict with compatible properties
tickfont
Sets the font for the `category` labels.
uid
Assign an id to this trace, Use this to provide
object constancy between traces during
animations and transitions.
uirevision
Controls persistence of some user-driven
changes to the trace: `constraintrange` in
`parcoords` traces, as well as some `editable:
true` modifications such as `name` and
`colorbar.title`. Defaults to
`layout.uirevision`. Note that other user-
driven trace attribute changes are controlled
by `layout` attributes: `trace.visible` is
controlled by `layout.legend.uirevision`,
`selectedpoints` is controlled by
`layout.selectionrevision`, and
`colorbar.(x|y)` (accessible with `config:
{editable: true}`) is controlled by
`layout.editrevision`. Trace changes are
tracked by `uid`, which only falls back on
trace index if no `uid` is provided. So if your
app can add/remove traces before the end of the
`data` array, such that the same trace has a
different index, you can still preserve user-
driven changes if you give each trace a `uid`
that stays with it as it moves.
visible
Determines whether or not this trace is
visible. If "legendonly", the trace is not
drawn, but can appear as a legend item
(provided that the legend itself is visible).
"""
),
**kwargs
)