File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 64316431 }
64326432
64336433 THStackPainter . prototype . GetMinMax = function ( iserr , pad ) {
6434- var res = { min : 0 , max : 0 } ,
6434+ var res = { min : 0 , max : 0 } ,
64356435 stack = this . GetObject ( ) ;
64366436
64376437 if ( this . nostack ) {
64386438 for ( var i = 0 ; i < stack . fHists . arr . length ; ++ i ) {
64396439 var resh = this . GetHistMinMax ( stack . fHists . arr [ i ] , iserr ) ;
6440- if ( i == 0 ) res = resh ; else {
6441- if ( resh . min < res . min ) res . min = resh . min ;
6442- if ( resh . max > res . max ) res . max = resh . max ;
6440+ if ( i == 0 ) {
6441+ res = resh ;
6442+ } else {
6443+ res . min = Math . min ( res . min , resh . min ) ;
6444+ res . max = Math . max ( res . max , resh . max ) ;
64436445 }
64446446 }
6445-
6446- if ( stack . fMaximum != - 1111 )
6447- res . max = stack . fMaximum ;
6448- else
6449- res . max *= 1.05 ;
6450-
6451- if ( stack . fMinimum != - 1111 ) res . min = stack . fMinimum ;
64526447 } else {
64536448 res . min = this . GetHistMinMax ( stack . fStack . arr [ 0 ] , iserr ) . min ;
6454- res . max = this . GetHistMinMax ( stack . fStack . arr [ stack . fStack . arr . length - 1 ] , iserr ) . max * 1.05 ;
6449+ res . max = this . GetHistMinMax ( stack . fStack . arr [ stack . fStack . arr . length - 1 ] , iserr ) . max ;
64556450 }
64566451
6452+ if ( stack . fMaximum != - 1111 ) res . max = stack . fMaximum ;
6453+ res . max *= 1.05 ;
6454+ if ( stack . fMinimum != - 1111 ) res . min = stack . fMinimum ;
6455+
64576456 if ( pad ) {
64586457 if ( pad . fLogy ) {
64596458 if ( res . min < 0 ) res . min = res . max * 1e-4 ;
You can’t perform that action at this time.
0 commit comments