@@ -2723,58 +2723,10 @@ d3 = function() {
27232723 var n = d3_time_percentRe . exec ( string . substring ( i , i + 1 ) ) ;
27242724 return n ? i + n [ 0 ] . length : - 1 ;
27252725 }
2726- function d3_true ( ) {
2727- return true ;
2728- }
2729- function d3_locale_timeScaleFormat ( localFormat ) {
2730- var utcFormat = localFormat . utc ;
2731- var localFormats = [ [ localFormat ( "%Y" ) , d3_true ] , [ localFormat ( "%B" ) , function ( d ) {
2732- return d . getMonth ( ) ;
2733- } ] , [ localFormat ( "%b %d" ) , function ( d ) {
2734- return d . getDate ( ) != 1 ;
2735- } ] , [ localFormat ( "%a %d" ) , function ( d ) {
2736- return d . getDay ( ) && d . getDate ( ) != 1 ;
2737- } ] , [ localFormat ( "%I %p" ) , function ( d ) {
2738- return d . getHours ( ) ;
2739- } ] , [ localFormat ( "%I:%M" ) , function ( d ) {
2740- return d . getMinutes ( ) ;
2741- } ] , [ localFormat ( ":%S" ) , function ( d ) {
2742- return d . getSeconds ( ) ;
2743- } ] , [ localFormat ( ".%L" ) , function ( d ) {
2744- return d . getMilliseconds ( ) ;
2745- } ] ] ;
2746- var utcFormats = [ [ utcFormat ( "%Y" ) , d3_true ] , [ utcFormat ( "%B" ) , function ( d ) {
2747- return d . getUTCMonth ( ) ;
2748- } ] , [ utcFormat ( "%b %d" ) , function ( d ) {
2749- return d . getUTCDate ( ) != 1 ;
2750- } ] , [ utcFormat ( "%a %d" ) , function ( d ) {
2751- return d . getUTCDay ( ) && d . getUTCDate ( ) != 1 ;
2752- } ] , [ utcFormat ( "%I %p" ) , function ( d ) {
2753- return d . getUTCHours ( ) ;
2754- } ] , [ utcFormat ( "%I:%M" ) , function ( d ) {
2755- return d . getUTCMinutes ( ) ;
2756- } ] , [ utcFormat ( ":%S" ) , function ( d ) {
2757- return d . getUTCSeconds ( ) ;
2758- } ] , [ utcFormat ( ".%L" ) , function ( d ) {
2759- return d . getUTCMilliseconds ( ) ;
2760- } ] ] ;
2761- var format = d3_locale_timeScaleMultiFormat ( localFormats ) ;
2762- format . utc = d3_locale_timeScaleMultiFormat ( utcFormats ) ;
2763- return format ;
2764- }
2765- function d3_locale_timeScaleMultiFormat ( formats ) {
2766- return function ( date ) {
2767- var i = formats . length - 1 , f = formats [ i ] ;
2768- while ( ! f [ 1 ] ( date ) ) f = formats [ -- i ] ;
2769- return f [ 0 ] ( date ) ;
2770- } ;
2771- }
27722726 d3 . locale = function ( locale ) {
2773- var timeFormat = d3_locale_timeFormat ( locale ) ;
27742727 return {
27752728 numberFormat : d3_locale_numberFormat ( locale ) ,
2776- timeFormat : timeFormat ,
2777- timeScaleFormat : d3_locale_timeScaleFormat ( timeFormat )
2729+ timeFormat : d3_locale_timeFormat ( locale )
27782730 } ;
27792731 } ;
27802732 var d3_locale_enUS = d3 . locale ( {
@@ -3167,6 +3119,9 @@ d3 = function() {
31673119 d3_geo_centroidPointXYZ ( x0 , y0 , z0 ) ;
31683120 }
31693121 }
3122+ function d3_true ( ) {
3123+ return true ;
3124+ }
31703125 function d3_geo_clipPolygon ( segments , compare , clipStartInside , interpolate , listener ) {
31713126 var subject = [ ] , clip = [ ] ;
31723127 segments . forEach ( function ( segment ) {
@@ -9169,7 +9124,8 @@ d3 = function() {
91699124 } ;
91709125 var d3_svg_brushResizes = [ [ "n" , "e" , "s" , "w" , "nw" , "ne" , "se" , "sw" ] , [ "e" , "w" ] , [ "n" , "s" ] , [ ] ] ;
91719126 var d3_time_format = d3_time . format = d3_locale_enUS . timeFormat ;
9172- var d3_time_formatIso = d3_time_format . utc ( "%Y-%m-%dT%H:%M:%S.%LZ" ) ;
9127+ var d3_time_formatUtc = d3_time_format . utc ;
9128+ var d3_time_formatIso = d3_time_formatUtc ( "%Y-%m-%dT%H:%M:%S.%LZ" ) ;
91739129 d3_time_format . iso = Date . prototype . toISOString && + new Date ( "2000-01-01T00:00:00.000Z" ) ? d3_time_formatIsoNative : d3_time_formatIso ;
91749130 function d3_time_formatIsoNative ( date ) {
91759131 return date . toISOString ( ) ;
@@ -9273,17 +9229,61 @@ d3 = function() {
92739229 }
92749230 var d3_time_scaleSteps = [ 1e3 , 5e3 , 15e3 , 3e4 , 6e4 , 3e5 , 9e5 , 18e5 , 36e5 , 108e5 , 216e5 , 432e5 , 864e5 , 1728e5 , 6048e5 , 2592e6 , 7776e6 , 31536e6 ] ;
92759231 var d3_time_scaleLocalMethods = [ [ d3_time . second , 1 ] , [ d3_time . second , 5 ] , [ d3_time . second , 15 ] , [ d3_time . second , 30 ] , [ d3_time . minute , 1 ] , [ d3_time . minute , 5 ] , [ d3_time . minute , 15 ] , [ d3_time . minute , 30 ] , [ d3_time . hour , 1 ] , [ d3_time . hour , 3 ] , [ d3_time . hour , 6 ] , [ d3_time . hour , 12 ] , [ d3_time . day , 1 ] , [ d3_time . day , 2 ] , [ d3_time . week , 1 ] , [ d3_time . month , 1 ] , [ d3_time . month , 3 ] , [ d3_time . year , 1 ] ] ;
9276- d3_time_scaleLocalMethods . year = d3_time . year ;
9277- d3_time . scale = function ( ) {
9278- return d3_time_scale ( d3 . scale . linear ( ) , d3_time_scaleLocalMethods , d3_locale_enUS . timeScaleFormat ) ;
9279- } ;
9232+ var d3_time_scaleLocalFormat = d3_time_scaleMultiFormat ( [ [ d3_time_format ( "%Y" ) , d3_true ] , [ d3_time_format ( "%B" ) , function ( d ) {
9233+ return d . getMonth ( ) ;
9234+ } ] , [ d3_time_format ( "%b %d" ) , function ( d ) {
9235+ return d . getDate ( ) != 1 ;
9236+ } ] , [ d3_time_format ( "%a %d" ) , function ( d ) {
9237+ return d . getDay ( ) && d . getDate ( ) != 1 ;
9238+ } ] , [ d3_time_format ( "%I %p" ) , function ( d ) {
9239+ return d . getHours ( ) ;
9240+ } ] , [ d3_time_format ( "%I:%M" ) , function ( d ) {
9241+ return d . getMinutes ( ) ;
9242+ } ] , [ d3_time_format ( ":%S" ) , function ( d ) {
9243+ return d . getSeconds ( ) ;
9244+ } ] , [ d3_time_format ( ".%L" ) , function ( d ) {
9245+ return d . getMilliseconds ( ) ;
9246+ } ] ] ) ;
92809247 var d3_time_scaleMilliseconds = {
92819248 range : function ( start , stop , step ) {
92829249 return d3 . range ( + start , + stop , step ) . map ( d3_time_scaleDate ) ;
92839250 } ,
92849251 floor : d3_identity ,
92859252 ceil : d3_identity
92869253 } ;
9254+ d3_time_scaleLocalMethods . year = d3_time . year ;
9255+ d3_time . scale = function ( ) {
9256+ return d3_time_scale ( d3 . scale . linear ( ) , d3_time_scaleLocalMethods , d3_time_scaleLocalFormat ) ;
9257+ } ;
9258+ function d3_time_scaleMultiFormat ( formats ) {
9259+ return function ( date ) {
9260+ var i = formats . length - 1 , f = formats [ i ] ;
9261+ while ( ! f [ 1 ] ( date ) ) f = formats [ -- i ] ;
9262+ return f [ 0 ] ( date ) ;
9263+ } ;
9264+ }
9265+ var d3_time_scaleUtcMethods = d3_time_scaleLocalMethods . map ( function ( m ) {
9266+ return [ m [ 0 ] . utc , m [ 1 ] ] ;
9267+ } ) ;
9268+ var d3_time_scaleUtcFormat = d3_time_scaleMultiFormat ( [ [ d3_time_formatUtc ( "%Y" ) , d3_true ] , [ d3_time_formatUtc ( "%B" ) , function ( d ) {
9269+ return d . getUTCMonth ( ) ;
9270+ } ] , [ d3_time_formatUtc ( "%b %d" ) , function ( d ) {
9271+ return d . getUTCDate ( ) != 1 ;
9272+ } ] , [ d3_time_formatUtc ( "%a %d" ) , function ( d ) {
9273+ return d . getUTCDay ( ) && d . getUTCDate ( ) != 1 ;
9274+ } ] , [ d3_time_formatUtc ( "%I %p" ) , function ( d ) {
9275+ return d . getUTCHours ( ) ;
9276+ } ] , [ d3_time_formatUtc ( "%I:%M" ) , function ( d ) {
9277+ return d . getUTCMinutes ( ) ;
9278+ } ] , [ d3_time_formatUtc ( ":%S" ) , function ( d ) {
9279+ return d . getUTCSeconds ( ) ;
9280+ } ] , [ d3_time_formatUtc ( ".%L" ) , function ( d ) {
9281+ return d . getUTCMilliseconds ( ) ;
9282+ } ] ] ) ;
9283+ d3_time_scaleUtcMethods . year = d3_time . year . utc ;
9284+ d3_time . scale . utc = function ( ) {
9285+ return d3_time_scale ( d3 . scale . linear ( ) , d3_time_scaleUtcMethods , d3_time_scaleUtcFormat ) ;
9286+ } ;
92879287 d3 . text = d3_xhrType ( function ( request ) {
92889288 return request . responseText ;
92899289 } ) ;
0 commit comments