Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49e46c5

Browse files
committed
Add _fade_to to GraphWidget.
1 parent 1174aca commit 49e46c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plotly/widgets/graph_widget.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,3 +841,11 @@ def extend_traces(self, update, indices=(0,), max_points=None):
841841
if max_points is not None:
842842
message['maxPoints'] = max_points
843843
self._handle_outgoing_message(message)
844+
845+
def _fade_to(self, duration, opacity):
846+
"""
847+
Change the opacity to give a visual signal to users.
848+
849+
"""
850+
message = {'fadeTo': True, 'duration': duration, 'opacity': opacity}
851+
self._handle_outgoing_message(message)

0 commit comments

Comments
 (0)