File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 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');
2626var axisIds = require ( './axis_ids' ) ;
2727var autoType = require ( './axis_autotype' ) ;
2828
29+
2930/**
3031 * options: object containing:
3132 *
Original file line number Diff line number Diff line change @@ -303,25 +303,28 @@ proto.updateFast = function(options) {
303303
304304 // TODO add 'very fast' mode that bypasses this loop
305305 // 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 ) {
309307
310- if ( isNumeric ( yy ) && ( fastType || isDateTime ) ) {
308+ for ( var i = 0 ; i < len ; ++ i ) {
309+ xx = x [ i ] ;
310+ yy = y [ i ] ;
311311
312- if ( ! fastType ) {
313- xx = Lib . dateTime2ms ( xx ) ;
314- }
312+ if ( isNumeric ( yy ) ) {
313+
314+ if ( ! fastType ) {
315+ xx = Lib . dateTime2ms ( xx ) ;
316+ }
315317
316- idToIndex [ pId ++ ] = i ;
318+ idToIndex [ pId ++ ] = i ;
317319
318- positions [ ptr ++ ] = xx ;
319- positions [ ptr ++ ] = yy ;
320+ positions [ ptr ++ ] = xx ;
321+ positions [ ptr ++ ] = yy ;
320322
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+ }
325328 }
326329 }
327330
You can’t perform that action at this time.
0 commit comments