@@ -471,26 +471,26 @@ d3.time.scale = function() {
471471 }
472472
473473 scale . invert = function ( x ) {
474- return d3_scale_time ( linear . invert ( x ) ) ;
474+ return d3_time_scaleDate ( linear . invert ( x ) ) ;
475475 } ;
476476
477477 scale . domain = function ( x ) {
478- if ( ! arguments . length ) return linear . domain ( ) . map ( d3_scale_time ) ;
478+ if ( ! arguments . length ) return linear . domain ( ) . map ( d3_time_scaleDate ) ;
479479 linear . domain ( x ) ;
480480 return scale ;
481481 } ;
482482
483483 scale . ticks = function ( m ) {
484- var extent = d3_scale_timeExtent ( scale . domain ( ) ) ,
484+ var extent = d3_time_scaleExtent ( scale . domain ( ) ) ,
485485 span = extent [ 1 ] - extent [ 0 ] ,
486486 target = span / m ;
487- i = d3 . bisect ( d3_scale_timeSteps , target , 1 , d3_scale_timeSteps . length - 1 ) ;
488- if ( Math . log ( target / d3_scale_timeSteps [ i - 1 ] ) < Math . log ( d3_scale_timeSteps [ i ] / target ) ) -- i ;
489- return d3_scale_timeMethods [ i ] ( extent [ 0 ] , extent [ 1 ] ) ;
487+ i = d3 . bisect ( d3_time_scaleSteps , target , 1 , d3_time_scaleSteps . length - 1 ) ;
488+ if ( Math . log ( target / d3_time_scaleSteps [ i - 1 ] ) < Math . log ( d3_time_scaleSteps [ i ] / target ) ) -- i ;
489+ return d3_time_scaleMethods [ i ] ( extent [ 0 ] , extent [ 1 ] ) ;
490490 } ;
491491
492492 scale . tickFormat = function ( ) {
493- return d3_scale_timeFormat ;
493+ return d3_time_scaleFormat ;
494494 } ;
495495
496496 // TOOD expose d3_scale_linear_rebind?
@@ -503,16 +503,16 @@ d3.time.scale = function() {
503503} ;
504504
505505// TODO expose d3_scaleExtent?
506- function d3_scale_timeExtent ( domain ) {
506+ function d3_time_scaleExtent ( domain ) {
507507 var start = domain [ 0 ] , stop = domain [ domain . length - 1 ] ;
508508 return start < stop ? [ start , stop ] : [ stop , start ] ;
509509}
510510
511- function d3_scale_time ( t ) {
511+ function d3_time_scaleDate ( t ) {
512512 return new Date ( t ) ;
513513}
514514
515- var d3_scale_timeFormats = [
515+ var d3_time_scaleFormats = [
516516 [ d3 . time . format ( "%Y" ) , function ( d ) { return true ; } ] ,
517517 [ d3 . time . format ( "%B" ) , function ( d ) { return d . getMonth ( ) ; } ] ,
518518 [ d3 . time . format ( "%b %d" ) , function ( d ) { return d . getDate ( ) != 1 ; } ] ,
@@ -522,13 +522,13 @@ var d3_scale_timeFormats = [
522522 [ d3 . time . format ( ":%S" ) , function ( d ) { return d . getSeconds ( ) || d . getMilliseconds ( ) ; } ]
523523] ;
524524
525- var d3_scale_timeFormat = function ( date ) {
526- var i = d3_scale_timeFormats . length - 1 , f = d3_scale_timeFormats [ i ] ;
527- while ( ! f [ 1 ] ( date ) ) f = d3_scale_timeFormats [ -- i ] ;
525+ var d3_time_scaleFormat = function ( date ) {
526+ var i = d3_time_scaleFormats . length - 1 , f = d3_time_scaleFormats [ i ] ;
527+ while ( ! f [ 1 ] ( date ) ) f = d3_time_scaleFormats [ -- i ] ;
528528 return f [ 0 ] ( date ) ;
529529} ;
530530
531- var d3_scale_timeSteps = [
531+ var d3_time_scaleSteps = [
532532 1e3 , // 1-second
533533 5e3 , // 5-second
534534 15e3 , // 15-second
@@ -549,7 +549,7 @@ var d3_scale_timeSteps = [
549549 31536e6 // 1-year
550550] ;
551551
552- var d3_scale_timeMethods = [
552+ var d3_time_scaleMethods = [
553553 d3 . time . seconds ,
554554 function ( a , b ) { return d3 . time . seconds ( a , b ) . filter ( function ( t ) { return ! ( t . getSeconds ( ) % 5 ) ; } ) ; } ,
555555 function ( a , b ) { return d3 . time . seconds ( a , b ) . filter ( function ( t ) { return ! ( t . getSeconds ( ) % 15 ) ; } ) ; } ,
@@ -570,7 +570,7 @@ var d3_scale_timeMethods = [
570570 d3 . time . years
571571] ;
572572
573- function d3_scale_timeFilter ( method , filter ) {
573+ function d3_time_scaleFilter ( method , filter ) {
574574 return function ( a , b ) {
575575 return method ( a , b ) . filter ( filter ) ;
576576 } ;
0 commit comments