Index: trunk/extensions/UsabilityInitiative/PrefStats/PrefStats.php |
— | — | @@ -47,6 +47,9 @@ |
48 | 48 | 'prefstats-factor-default' => null, |
49 | 49 | ); |
50 | 50 | |
| 51 | +// How many bars to strive for in default scaling |
| 52 | +$wgPrefStatsDefaultScaleBars = 15; |
| 53 | + |
51 | 54 | // Whether to run possibly expensive COUNT(*) queries on the user_properties |
52 | 55 | // table |
53 | 56 | $wgPrefStatsExpensiveCounts = false; |
Index: trunk/extensions/UsabilityInitiative/PrefStats/SpecialPrefStats.php |
— | — | @@ -126,10 +126,10 @@ |
127 | 127 | } |
128 | 128 | |
129 | 129 | function getPrefStats( $pref, $inc = null ) { |
130 | | - global $wgPrefStatsTimeUnit; |
| 130 | + global $wgPrefStatsTimeUnit, $wgPrefStatsDefaultScaleBars; |
131 | 131 | $max = ceil( $this->getMaxDuration( $pref ) / |
132 | 132 | $wgPrefStatsTimeUnit ); |
133 | | - $inc = max( 1, ( is_null( $inc ) ? ceil( $max / 10 ) : $inc ) ); |
| 133 | + $inc = max( 1, ( is_null( $inc ) ? ceil( $max / $wgPrefStatsDefaultScaleBars ) : $inc ) ); |
134 | 134 | $retval = array(); |
135 | 135 | for ( $i = 0; $i <= $max; $i += $inc ) { |
136 | 136 | $end = min( $max, $i + $inc ); |