File tree 2 files changed +18
-14
lines changed
2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ var orderedCategories = require('./ordered_categories');
26
26
var axisIds = require ( './axis_ids' ) ;
27
27
var autoType = require ( './axis_autotype' ) ;
28
28
29
+
29
30
/**
30
31
* options: object containing:
31
32
*
Original file line number Diff line number Diff line change @@ -303,25 +303,28 @@ proto.updateFast = function(options) {
303
303
304
304
// TODO add 'very fast' mode that bypasses this loop
305
305
// TODO bypass this on modebar +/- zoom
306
- for ( var i = 0 ; i < len ; ++ i ) {
307
- xx = x [ i ] ;
308
- yy = y [ i ] ;
306
+ if ( fastType || isDateTime ) {
309
307
310
- if ( isNumeric ( yy ) && ( fastType || isDateTime ) ) {
308
+ for ( var i = 0 ; i < len ; ++ i ) {
309
+ xx = x [ i ] ;
310
+ yy = y [ i ] ;
311
311
312
- if ( ! fastType ) {
313
- xx = Lib . dateTime2ms ( xx ) ;
314
- }
312
+ if ( isNumeric ( yy ) ) {
313
+
314
+ if ( ! fastType ) {
315
+ xx = Lib . dateTime2ms ( xx ) ;
316
+ }
315
317
316
- idToIndex [ pId ++ ] = i ;
318
+ idToIndex [ pId ++ ] = i ;
317
319
318
- positions [ ptr ++ ] = xx ;
319
- positions [ ptr ++ ] = yy ;
320
+ positions [ ptr ++ ] = xx ;
321
+ positions [ ptr ++ ] = yy ;
320
322
321
- bounds [ 0 ] = Math . min ( bounds [ 0 ] , xx ) ;
322
- bounds [ 1 ] = Math . min ( bounds [ 1 ] , yy ) ;
323
- bounds [ 2 ] = Math . max ( bounds [ 2 ] , xx ) ;
324
- bounds [ 3 ] = Math . max ( bounds [ 3 ] , yy ) ;
323
+ bounds [ 0 ] = Math . min ( bounds [ 0 ] , xx ) ;
324
+ bounds [ 1 ] = Math . min ( bounds [ 1 ] , yy ) ;
325
+ bounds [ 2 ] = Math . max ( bounds [ 2 ] , xx ) ;
326
+ bounds [ 3 ] = Math . max ( bounds [ 3 ] , yy ) ;
327
+ }
325
328
}
326
329
}
327
330
You can’t perform that action at this time.
0 commit comments