Skip to content

Commit 9ae4421

Browse files
committed
update language of callback arguments
1 parent e07b25c commit 9ae4421

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

plotly/widgets/graph_widget.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def on_hover(self, callback, remove=False):
191191
Example:
192192
```
193193
from IPython.display import display
194-
def message_handler(widget, msg):
194+
def message_handler(widget, hover_msg):
195195
display(widget._graph_url)
196-
display(msg)
196+
display(hover_msg)
197197
198198
g = Graph('https://plot.ly/~chris/3375')
199199
display(g)
@@ -211,16 +211,16 @@ def on_zoom(self, callback, remove=False):
211211
Args:
212212
callback (function): Callback function this is called
213213
on zoom events with the signature:
214-
callback(widget, zoom_obj) -> None
214+
callback(widget, ranges) -> None
215215
216216
Args:
217217
widget (GraphWidget): The current instance
218218
of the graph widget that this callback is assigned to.
219219
220-
zoom_obj (dict): A description of the
220+
ranges (dict): A description of the
221221
region that was zoomed into.
222222
223-
zoom_obj example:
223+
ranges example:
224224
{
225225
'x': [1.8399058038561549, 2.16443359662],
226226
'y': [4.640902872777017, 7.855677154582]
@@ -235,9 +235,9 @@ def on_zoom(self, callback, remove=False):
235235
Example:
236236
```
237237
from IPython.display import display
238-
def message_handler(widget, msg):
238+
def message_handler(widget, ranges):
239239
display(widget._graph_url)
240-
display(msg)
240+
display(ranges)
241241
242242
g = Graph('https://plot.ly/~chris/3375')
243243
display(g)

0 commit comments

Comments
 (0)