@@ -135,12 +135,15 @@ def relayout(self, layout):
135
135
}
136
136
self ._handle_outgoing_message (message )
137
137
138
- def hover (self , hover_obj , subplot = None ):
138
+ def hover (self , * hover_objs ):
139
+ # TODO: key check
140
+ if len (hover_objs ) == 1 :
141
+ hover_objs = hover_objs [0 ]
142
+
139
143
message = {
140
- 'task' : 'hover' , 'selection' : hover_obj , 'graphId' : self ._graphId
144
+ 'task' : 'hover' , 'selection' : hover_objs , 'graphId' : self ._graphId
141
145
}
142
- if subplot is not None :
143
- message ['subplot' ] = subplot
146
+
144
147
self ._handle_outgoing_message (message )
145
148
146
149
def add_traces (self , traces , new_indices = None ):
@@ -149,9 +152,10 @@ def add_traces(self, traces, new_indices=None):
149
152
150
153
If `new_indices` isn't specified, they are simply appended.
151
154
152
- :param (list[dict]) traces: The list of trace dicts
153
- :param (list[int]|None|optional) new_indices: The final indices the
154
- added traces should occupy.
155
+ Args:
156
+ traces (dict or list of dicts, or class of plotly.graph_obj): trace
157
+ new_indices (list[int]|None), optional: The final indices the
158
+ added traces should occupy in the graph.
155
159
156
160
"""
157
161
message = {
0 commit comments