@@ -20,7 +20,7 @@ var Axes = require('../../plots/cartesian/axes');
2020var autoType = require ( '../../plots/cartesian/axis_autotype' ) ;
2121var ErrorBars = require ( '../../components/errorbars' ) ;
2222var str2RGBArray = require ( '../../lib/str2rgbarray' ) ;
23- var truncate = require ( '../../lib/float32_truncate ' ) ;
23+ var truncate = require ( '../../lib/typed_array_truncate ' ) ;
2424var formatColor = require ( '../../lib/gl_format_color' ) ;
2525var subTypes = require ( '../scatter/subtypes' ) ;
2626var makeBubbleSizeFn = require ( '../scatter/make_bubble_size_func' ) ;
@@ -51,7 +51,7 @@ function LineWithMarkers(scene, uid) {
5151
5252 this . hasLines = false ;
5353 this . lineOptions = {
54- positions : new Float32Array ( 0 ) ,
54+ positions : new Float64Array ( 0 ) ,
5555 color : [ 0 , 0 , 0 , 1 ] ,
5656 width : 1 ,
5757 fill : [ false , false , false , false ] ,
@@ -67,8 +67,8 @@ function LineWithMarkers(scene, uid) {
6767
6868 this . hasErrorX = false ;
6969 this . errorXOptions = {
70- positions : new Float32Array ( 0 ) ,
71- errors : new Float32Array ( 0 ) ,
70+ positions : new Float64Array ( 0 ) ,
71+ errors : new Float64Array ( 0 ) ,
7272 lineWidth : 1 ,
7373 capSize : 0 ,
7474 color : [ 0 , 0 , 0 , 1 ]
@@ -78,8 +78,8 @@ function LineWithMarkers(scene, uid) {
7878
7979 this . hasErrorY = false ;
8080 this . errorYOptions = {
81- positions : new Float32Array ( 0 ) ,
82- errors : new Float32Array ( 0 ) ,
81+ positions : new Float64Array ( 0 ) ,
82+ errors : new Float64Array ( 0 ) ,
8383 lineWidth : 1 ,
8484 capSize : 0 ,
8585 color : [ 0 , 0 , 0 , 1 ]
@@ -89,7 +89,7 @@ function LineWithMarkers(scene, uid) {
8989
9090 this . hasMarkers = false ;
9191 this . scatterOptions = {
92- positions : new Float32Array ( 0 ) ,
92+ positions : new Float64Array ( 0 ) ,
9393 sizes : [ ] ,
9494 colors : [ ] ,
9595 glyphs : [ ] ,
@@ -291,7 +291,7 @@ proto.updateFast = function(options) {
291291
292292 var len = x . length ,
293293 idToIndex = new Array ( len ) ,
294- positions = new Float32Array ( 2 * len ) ,
294+ positions = new Float64Array ( 2 * len ) ,
295295 bounds = this . bounds ,
296296 pId = 0 ,
297297 ptr = 0 ;
@@ -357,13 +357,13 @@ proto.updateFast = function(options) {
357357 this . scatter . update ( this . scatterOptions ) ;
358358 }
359359 else {
360- this . scatterOptions . positions = new Float32Array ( 0 ) ;
360+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
361361 this . scatterOptions . glyphs = [ ] ;
362362 this . scatter . update ( this . scatterOptions ) ;
363363 }
364364
365365 // turn off fancy scatter plot
366- this . scatterOptions . positions = new Float32Array ( 0 ) ;
366+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
367367 this . scatterOptions . glyphs = [ ] ;
368368 this . fancyScatter . update ( this . scatterOptions ) ;
369369
@@ -389,9 +389,9 @@ proto.updateFancy = function(options) {
389389
390390 var len = x . length ,
391391 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 ) ,
395395 pId = 0 ,
396396 ptr = 0 ,
397397 ptrX = 0 ,
@@ -482,13 +482,13 @@ proto.updateFancy = function(options) {
482482 this . fancyScatter . update ( this . scatterOptions ) ;
483483 }
484484 else {
485- this . scatterOptions . positions = new Float32Array ( 0 ) ;
485+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
486486 this . scatterOptions . glyphs = [ ] ;
487487 this . fancyScatter . update ( this . scatterOptions ) ;
488488 }
489489
490490 // turn off fast scatter plot
491- this . scatterOptions . positions = new Float32Array ( 0 ) ;
491+ this . scatterOptions . positions = new Float64Array ( 0 ) ;
492492 this . scatterOptions . glyphs = [ ] ;
493493 this . scatter . update ( this . scatterOptions ) ;
494494
@@ -506,7 +506,7 @@ proto.updateLines = function(options, positions) {
506506 var p = 0 ;
507507 var x = this . xData ;
508508 var y = this . yData ;
509- linePositions = new Float32Array ( 2 * x . length ) ;
509+ linePositions = new Float64Array ( 2 * x . length ) ;
510510
511511 for ( i = 0 ; i < x . length ; ++ i ) {
512512 linePositions [ p ++ ] = x [ i ] ;
@@ -542,7 +542,7 @@ proto.updateLines = function(options, positions) {
542542 this . lineOptions . fillColor = [ fillColor , fillColor , fillColor , fillColor ] ;
543543 }
544544 else {
545- this . lineOptions . positions = new Float32Array ( 0 ) ;
545+ this . lineOptions . positions = new Float64Array ( 0 ) ;
546546 }
547547
548548 this . line . update ( this . lineOptions ) ;
@@ -565,7 +565,7 @@ proto.updateError = function(axLetter, options, positions, errors) {
565565 errorObjOptions . color = convertColor ( errorOptions . color , 1 , 1 ) ;
566566 }
567567 else {
568- errorObjOptions . positions = new Float32Array ( 0 ) ;
568+ errorObjOptions . positions = new Float64Array ( 0 ) ;
569569 }
570570
571571 errorObj . update ( errorObjOptions ) ;
@@ -588,7 +588,7 @@ proto.expandAxesFast = function(bounds, markerSize) {
588588 }
589589} ;
590590
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)
592592// but close enough for now
593593proto . expandAxesFancy = function ( x , y , ppad ) {
594594 var scene = this . scene ,
0 commit comments