@@ -20,7 +20,7 @@ var Axes = require('../../plots/cartesian/axes');
20
20
var autoType = require ( '../../plots/cartesian/axis_autotype' ) ;
21
21
var ErrorBars = require ( '../../components/errorbars' ) ;
22
22
var str2RGBArray = require ( '../../lib/str2rgbarray' ) ;
23
- var truncate = require ( '../../lib/float32_truncate ' ) ;
23
+ var truncate = require ( '../../lib/typed_array_truncate ' ) ;
24
24
var formatColor = require ( '../../lib/gl_format_color' ) ;
25
25
var subTypes = require ( '../scatter/subtypes' ) ;
26
26
var makeBubbleSizeFn = require ( '../scatter/make_bubble_size_func' ) ;
@@ -51,7 +51,7 @@ function LineWithMarkers(scene, uid) {
51
51
52
52
this . hasLines = false ;
53
53
this . lineOptions = {
54
- positions : new Float32Array ( 0 ) ,
54
+ positions : new Float64Array ( 0 ) ,
55
55
color : [ 0 , 0 , 0 , 1 ] ,
56
56
width : 1 ,
57
57
fill : [ false , false , false , false ] ,
@@ -67,8 +67,8 @@ function LineWithMarkers(scene, uid) {
67
67
68
68
this . hasErrorX = false ;
69
69
this . errorXOptions = {
70
- positions : new Float32Array ( 0 ) ,
71
- errors : new Float32Array ( 0 ) ,
70
+ positions : new Float64Array ( 0 ) ,
71
+ errors : new Float64Array ( 0 ) ,
72
72
lineWidth : 1 ,
73
73
capSize : 0 ,
74
74
color : [ 0 , 0 , 0 , 1 ]
@@ -78,8 +78,8 @@ function LineWithMarkers(scene, uid) {
78
78
79
79
this . hasErrorY = false ;
80
80
this . errorYOptions = {
81
- positions : new Float32Array ( 0 ) ,
82
- errors : new Float32Array ( 0 ) ,
81
+ positions : new Float64Array ( 0 ) ,
82
+ errors : new Float64Array ( 0 ) ,
83
83
lineWidth : 1 ,
84
84
capSize : 0 ,
85
85
color : [ 0 , 0 , 0 , 1 ]
@@ -89,7 +89,7 @@ function LineWithMarkers(scene, uid) {
89
89
90
90
this . hasMarkers = false ;
91
91
this . scatterOptions = {
92
- positions : new Float32Array ( 0 ) ,
92
+ positions : new Float64Array ( 0 ) ,
93
93
sizes : [ ] ,
94
94
colors : [ ] ,
95
95
glyphs : [ ] ,
@@ -291,7 +291,7 @@ proto.updateFast = function(options) {
291
291
292
292
var len = x . length ,
293
293
idToIndex = new Array ( len ) ,
294
- positions = new Float32Array ( 2 * len ) ,
294
+ positions = new Float64Array ( 2 * len ) ,
295
295
bounds = this . bounds ,
296
296
pId = 0 ,
297
297
ptr = 0 ;
@@ -357,13 +357,13 @@ proto.updateFast = function(options) {
357
357
this . scatter . update ( this . scatterOptions ) ;
358
358
}
359
359
else {
360
- this . scatterOptions . positions = new Float32Array ( 0 ) ;
360
+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
361
361
this . scatterOptions . glyphs = [ ] ;
362
362
this . scatter . update ( this . scatterOptions ) ;
363
363
}
364
364
365
365
// turn off fancy scatter plot
366
- this . scatterOptions . positions = new Float32Array ( 0 ) ;
366
+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
367
367
this . scatterOptions . glyphs = [ ] ;
368
368
this . fancyScatter . update ( this . scatterOptions ) ;
369
369
@@ -389,9 +389,9 @@ proto.updateFancy = function(options) {
389
389
390
390
var len = x . length ,
391
391
idToIndex = new Array ( len ) ,
392
- positions = new Float32Array ( 2 * len ) ,
393
- errorsX = new Float32Array ( 4 * len ) ,
394
- errorsY = new Float32Array ( 4 * len ) ,
392
+ positions = new Float64Array ( 2 * len ) ,
393
+ errorsX = new Float64Array ( 4 * len ) ,
394
+ errorsY = new Float64Array ( 4 * len ) ,
395
395
pId = 0 ,
396
396
ptr = 0 ,
397
397
ptrX = 0 ,
@@ -482,13 +482,13 @@ proto.updateFancy = function(options) {
482
482
this . fancyScatter . update ( this . scatterOptions ) ;
483
483
}
484
484
else {
485
- this . scatterOptions . positions = new Float32Array ( 0 ) ;
485
+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
486
486
this . scatterOptions . glyphs = [ ] ;
487
487
this . fancyScatter . update ( this . scatterOptions ) ;
488
488
}
489
489
490
490
// turn off fast scatter plot
491
- this . scatterOptions . positions = new Float32Array ( 0 ) ;
491
+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
492
492
this . scatterOptions . glyphs = [ ] ;
493
493
this . scatter . update ( this . scatterOptions ) ;
494
494
@@ -506,7 +506,7 @@ proto.updateLines = function(options, positions) {
506
506
var p = 0 ;
507
507
var x = this . xData ;
508
508
var y = this . yData ;
509
- linePositions = new Float32Array ( 2 * x . length ) ;
509
+ linePositions = new Float64Array ( 2 * x . length ) ;
510
510
511
511
for ( i = 0 ; i < x . length ; ++ i ) {
512
512
linePositions [ p ++ ] = x [ i ] ;
@@ -542,7 +542,7 @@ proto.updateLines = function(options, positions) {
542
542
this . lineOptions . fillColor = [ fillColor , fillColor , fillColor , fillColor ] ;
543
543
}
544
544
else {
545
- this . lineOptions . positions = new Float32Array ( 0 ) ;
545
+ this . lineOptions . positions = new Float64Array ( 0 ) ;
546
546
}
547
547
548
548
this . line . update ( this . lineOptions ) ;
@@ -565,7 +565,7 @@ proto.updateError = function(axLetter, options, positions, errors) {
565
565
errorObjOptions . color = convertColor ( errorOptions . color , 1 , 1 ) ;
566
566
}
567
567
else {
568
- errorObjOptions . positions = new Float32Array ( 0 ) ;
568
+ errorObjOptions . positions = new Float64Array ( 0 ) ;
569
569
}
570
570
571
571
errorObj . update ( errorObjOptions ) ;
@@ -588,7 +588,7 @@ proto.expandAxesFast = function(bounds, markerSize) {
588
588
}
589
589
} ;
590
590
591
- // not quite on-par with 'scatter' (scatter fill in several other expand options),
591
+ // not quite on-par with 'scatter' (scatter fill in several other expand options)
592
592
// but close enough for now
593
593
proto . expandAxesFancy = function ( x , y , ppad ) {
594
594
var scene = this . scene ,
0 commit comments