@ -302,24 +302,17 @@
var defaultColorPattern = [ '#1f77b4' , '#ff7f0e' , '#2ca02c' , '#d62728' , '#9467bd' , '#8c564b' , '#e377c2' , '#7f7f7f' , '#bcbd22' , '#17becf' ] , //same as d3.scale.category10()
var defaultColorPattern = [ '#1f77b4' , '#ff7f0e' , '#2ca02c' , '#d62728' , '#9467bd' , '#8c564b' , '#e377c2' , '#7f7f7f' , '#bcbd22' , '#17becf' ] , //same as d3.scale.category10()
color = generateColor ( _ _data _colors , notEmpty ( _ _color _pattern ) ? _ _color _pattern : defaultColorPattern , _ _data _color ) ;
color = generateColor ( _ _data _colors , notEmpty ( _ _color _pattern ) ? _ _color _pattern : defaultColorPattern , _ _data _color ) ;
var xTimeFormat = _ _axis _x _localtime ? d3 . time . format : d3 . time . format . utc ,
var timeFormat = _ _axis _x _localtime ? d3 . time . format : d3 . time . format . utc ,
defaultTimeFormat = ( function ( ) {
defaultTimeFormat = timeFormat . multi ( [
var formats = [
[ ".%L" , function ( d ) { return d . getMilliseconds ( ) ; } ] ,
[ xTimeFormat ( "%Y/%-m/%-d" ) , function ( ) { return true ; } ] ,
[ ":%S" , function ( d ) { return d . getSeconds ( ) ; } ] ,
[ xTimeFormat ( "%-m/%-d" ) , function ( d ) { return d . getMonth ( ) ; } ] ,
[ "%I:%M" , function ( d ) { return d . getMinutes ( ) ; } ] ,
[ xTimeFormat ( "%-m/%-d" ) , function ( d ) { return d . getDate ( ) !== 1 ; } ] ,
[ "%I %p" , function ( d ) { return d . getHours ( ) ; } ] ,
[ xTimeFormat ( "%-m/%-d" ) , function ( d ) { return d . getDay ( ) && d . getDate ( ) !== 1 ; } ] ,
[ "%-m/%-d" , function ( d ) { return d . getDay ( ) && d . getDate ( ) !== 1 ; } ] ,
[ xTimeFormat ( "%I %p" ) , function ( d ) { return d . getHours ( ) ; } ] ,
[ "%-m/%-d" , function ( d ) { return d . getDate ( ) !== 1 ; } ] ,
[ xTimeFormat ( "%I:%M" ) , function ( d ) { return d . getMinutes ( ) ; } ] ,
[ "%-m/%-d" , function ( d ) { return d . getMonth ( ) ; } ] ,
[ xTimeFormat ( ":%S" ) , function ( d ) { return d . getSeconds ( ) ; } ] ,
[ "%Y/%-m/%-d" , function ( ) { return true ; } ]
[ xTimeFormat ( ".%L" ) , function ( d ) { return d . getMilliseconds ( ) ; } ]
] ) ;
] ;
return function ( date ) {
var i = formats . length - 1 , f = formats [ i ] ;
while ( ! f [ 1 ] ( date ) ) { f = formats [ -- i ] ; }
return f [ 0 ] ( date ) ;
} ;
} ) ( ) ;
var hiddenTargetIds = [ ] , hiddenLegendIds = [ ] ;
var hiddenTargetIds = [ ] , hiddenLegendIds = [ ] ;
@ -734,7 +727,7 @@
format = _ _axis _x _tick _format ;
format = _ _axis _x _tick _format ;
} else if ( isTimeSeries ) {
} else if ( isTimeSeries ) {
format = function ( date ) {
format = function ( date ) {
return date ? xT imeFormat( _ _axis _x _tick _format ) ( date ) : "" ;
return date ? t imeFormat( _ _axis _x _tick _format ) ( date ) : "" ;
} ;
} ;
}
}
}
}