File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ Direct developer email support can be purchased through a [Support Plan][4] or b
99
99
© Arction Ltd 2009-2020. All rights reserved.
100
100
101
101
102
- [ XY cartesian chart ] : https://www.arction.com/lightningchart-js-api-documentation/v3.1 .0/classes/chartxy.html
103
- [ Scroll strategies ] : https://www.arction.com/lightningchart-js-api-documentation/v3.1 .0/globals.html#axisscrollstrategies
104
- [ Line series ] : https://www.arction.com/lightningchart-js-api-documentation/v3.1 .0/classes/lineseries.html
105
- [ Data patterns ] : https://www.arction.com/lightningchart-js-api-documentation/v3.1 .0/interfaces/datapattern.html
102
+ [ XY cartesian chart ] : https://www.arction.com/lightningchart-js-api-documentation/v3.3 .0/classes/chartxy.html
103
+ [ Scroll strategies ] : https://www.arction.com/lightningchart-js-api-documentation/v3.3 .0/globals.html#axisscrollstrategies
104
+ [ Line series ] : https://www.arction.com/lightningchart-js-api-documentation/v3.3 .0/classes/lineseries.html
105
+ [ Data patterns ] : https://www.arction.com/lightningchart-js-api-documentation/v3.3 .0/interfaces/datapattern.html
106
106
[ Progressive trace data generator ] : https://arction.github.io/xydata/classes/progressivetracegenerator.html
107
107
Original file line number Diff line number Diff line change 14
14
"webpack-dev-server" : " ^3.9.0"
15
15
},
16
16
"dependencies" : {
17
- "@arction/lcjs" : " ^3.2 .0" ,
17
+ "@arction/lcjs" : " ^3.3 .0" ,
18
18
"@arction/xydata" : " ^1.4.0" ,
19
19
"clean-webpack-plugin" : " ^3.0.0" ,
20
20
"webpack" : " ^4.41.2" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,16 @@ createProgressiveTraceGenerator()
38
38
. toPromise ( )
39
39
. then ( data => {
40
40
chart . setTitle ( '1 Million Points Line Trace' )
41
- setInterval ( ( ) => {
42
- series . add ( data . splice ( 0 , 20000 ) )
43
- } , 50 )
41
+ const dataLen = data . length
42
+ let dataPointsCount = 0
43
+ const addPoints = ( ) => {
44
+ const addDataPointsCount = 20000
45
+ const newDataPoints = data . slice ( dataPointsCount , dataPointsCount + addDataPointsCount )
46
+ series . add ( newDataPoints )
47
+ dataPointsCount += addDataPointsCount
48
+ if ( dataPointsCount < dataLen ) {
49
+ requestAnimationFrame ( addPoints )
50
+ }
51
+ }
52
+ addPoints ( )
44
53
} )
You can’t perform that action at this time.
0 commit comments