@@ -31,7 +31,8 @@ class GraphWidget(widgets.DOMWidget):
31
31
_message = Unicode (sync = True )
32
32
_graph_url = Unicode (sync = True )
33
33
34
- def __init__ (self , graph_url , ** kwargs ):
34
+ # TODO: URL for offline enterprise
35
+ def __init__ (self , graph_url = 'https://plot.ly/~playground/7' , ** kwargs ):
35
36
"""Initialize a plotly graph widget
36
37
37
38
Args:
@@ -147,7 +148,7 @@ def message_handler(widget, msg):
147
148
display(widget._graph_url)
148
149
display(msg)
149
150
150
- g = Graph ('https://plot.ly/~chris/3375')
151
+ g = GraphWidget ('https://plot.ly/~chris/3375')
151
152
display(g)
152
153
153
154
g.on_click(message_handler)
@@ -195,7 +196,7 @@ def message_handler(widget, hover_msg):
195
196
display(widget._graph_url)
196
197
display(hover_msg)
197
198
198
- g = Graph ('https://plot.ly/~chris/3375')
199
+ g = GraphWidget ('https://plot.ly/~chris/3375')
199
200
display(g)
200
201
201
202
g.on_hover(message_handler)
@@ -239,7 +240,7 @@ def message_handler(widget, ranges):
239
240
display(widget._graph_url)
240
241
display(ranges)
241
242
242
- g = Graph ('https://plot.ly/~chris/3375')
243
+ g = GraphWidget ('https://plot.ly/~chris/3375')
243
244
display(g)
244
245
245
246
g.on_zoom(message_handler)
@@ -288,7 +289,7 @@ def restyle(self, data, indices=None):
288
289
from plotly.widgets import Graph
289
290
from IPython.display import display
290
291
291
- graph = Graph ('https://plot.ly/~chris/3979')
292
+ graph = GraphWidget ('https://plot.ly/~chris/3979')
292
293
display(graph)
293
294
```
294
295
@@ -377,7 +378,7 @@ def relayout(self, layout):
377
378
from plotly.widgets import Graph
378
379
from IPython.display import display
379
380
380
- graph = Graph ('https://plot.ly/~chris/3979')
381
+ graph = GraphWidget ('https://plot.ly/~chris/3979')
381
382
display(graph)
382
383
```
383
384
@@ -460,7 +461,7 @@ def hover(self, *hover_objs):
460
461
from plotly.widgets import Graph
461
462
from IPython.display import display
462
463
463
- graph = Graph ('https://plot.ly/~chris/3979')
464
+ graph = GraphWidget ('https://plot.ly/~chris/3979')
464
465
display(graph)
465
466
```
466
467
@@ -509,7 +510,7 @@ def add_traces(self, traces, new_indices=None):
509
510
from plotly.graph_objs import Scatter
510
511
from IPython.display import display
511
512
512
- graph = Graph ('https://plot.ly/~chris/3979')
513
+ graph = GraphWidget ('https://plot.ly/~chris/3979')
513
514
display(graph)
514
515
```
515
516
@@ -553,7 +554,7 @@ def delete_traces(self, indices):
553
554
from plotly.widgets import Graph
554
555
from IPython.display import display
555
556
556
- graph = Graph ('https://plot.ly/~chris/3979')
557
+ graph = GraphWidget ('https://plot.ly/~chris/3979')
557
558
display(graph)
558
559
559
560
0 commit comments