@@ -38,12 +38,13 @@ const createCell = (cell) => {
3838 rowIndex : cell . row ,
3939 columnSpan : 1 ,
4040 rowSpan : 1 ,
41+ legend : { visible : false } ,
4142 } )
4243 // Add a random omni-directional series.
4344 const type = chooseRandom ( [ 'PointSeries' , 'LineSeries' ] )
4445 // Setup data-generation for series.
4546 if ( cell . row == cell . col ) {
46- const series = chart [ 'add' + type ] ( )
47+ const series = chart [ 'add' + type ] ( { } )
4748 // Random trace
4849 createTraceGenerator ( )
4950 . setNumberOfPoints ( 100000 )
@@ -52,7 +53,7 @@ const createCell = (cell) => {
5253 . setStreamBatchSize ( 10 )
5354 . setStreamRepeat ( true )
5455 . toStream ( )
55- . forEach ( ( point ) => series . add ( point ) )
56+ . forEach ( ( point ) => series . appendSample ( point ) )
5657 } else {
5758 // Random progressive trace with mapped direction.
5859 const flipPlane = cell . col == 1
@@ -75,7 +76,7 @@ const createCell = (cell) => {
7576 } else
7677 axisX
7778 . setInterval ( { start : 0 , end : 100 , stopAxisAfter : false } )
78- . setScrollStrategy ( flipPlane ? AxisScrollStrategies . fitting : AxisScrollStrategies . progressive )
79+ . setScrollStrategy ( flipPlane ? AxisScrollStrategies . fitting : AxisScrollStrategies . scrolling )
7980
8081 if ( mul . y < 0 ) {
8182 axisY
@@ -84,7 +85,7 @@ const createCell = (cell) => {
8485 } else
8586 axisY
8687 . setInterval ( { start : 0 , end : 100 , stopAxisAfter : false } )
87- . setScrollStrategy ( flipPlane ? AxisScrollStrategies . progressive : AxisScrollStrategies . fitting )
88+ . setScrollStrategy ( flipPlane ? AxisScrollStrategies . scrolling : AxisScrollStrategies . fitting )
8889
8990 const series = chart [ 'add' + type ] ( axisX , axisY )
9091 createProgressiveTraceGenerator ( )
@@ -94,7 +95,9 @@ const createCell = (cell) => {
9495 . setStreamBatchSize ( 2 )
9596 . setStreamRepeat ( true )
9697 . toStream ( )
97- . forEach ( ( point ) => series . add ( { x : ( flipPlane ? point . y : point . x ) * mul . x , y : ( flipPlane ? point . x : point . y ) * mul . y } ) )
98+ . forEach ( ( point ) =>
99+ series . appendSample ( { x : ( flipPlane ? point . y : point . x ) * mul . x , y : ( flipPlane ? point . x : point . y ) * mul . y } ) ,
100+ )
98101 }
99102 return chart . setTitle ( type )
100103}
0 commit comments