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

Skip to content

Commit c2d123c

Browse files
committed
Plotly Streaming examples: add counter increment to stop after 100 plots
1 parent 568cea5 commit c2d123c

6 files changed

+6
-6
lines changed

_posts/plotly_js/streaming/2017-07-13-basic-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
y: [[rand()]]
2727
}, [0])
2828

29-
if(cnt === 100) clearInterval(interval);
29+
if(++cnt === 100) clearInterval(interval);
3030
}, 300);

_posts/plotly_js/streaming/2017-07-13-mulitple-trace.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
y: [[rand()], [rand()]]
3131
}, [0, 1])
3232

33-
if(cnt === 100) clearInterval(interval);
33+
if(++cnt === 100) clearInterval(interval);
3434
}, 300);

_posts/plotly_js/streaming/2017-07-13-streaming-30-points.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636

3737
Plotly.update('graph', data_update)
3838

39-
if(cnt === 100) clearInterval(interval);
39+
if(++cnt === 100) clearInterval(interval);
4040
}, 1000);

_posts/plotly_js/streaming/2017-07-13-streaming-subplots.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@
6767

6868
Plotly.extendTraces('graph', update, [0,1])
6969

70-
if(cnt === 100) clearInterval(interval);
70+
if(++cnt === 100) clearInterval(interval);
7171
}, 1000);

_posts/plotly_js/streaming/2017-07-13-streaming-timestamp.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737

3838
Plotly.extendTraces('graph', update, [0])
3939

40-
if(cnt === 100) clearInterval(interval);
40+
if(++cnt === 100) clearInterval(interval);
4141
}, 1000);

_posts/plotly_js/streaming/2017-07-13-streaming-timestamp_range.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@
4747
Plotly.relayout('graph', minuteView);
4848
Plotly.extendTraces('graph', update, [0])
4949

50-
if(cnt === 100) clearInterval(interval);
50+
if(++cnt === 100) clearInterval(interval);
5151
}, 1000);

0 commit comments

Comments
 (0)