Skip to content

Commit 434c730

Browse files
committed
Stats bug fix -> better value for global size
1 parent f49c2cf commit 434c730

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ <h2 class="large-6 small-4 columns">Repos</h2>
142142
<option value="-pushed_at">Last Push</option>
143143
<option value="org">Organization</option>
144144
<option value="name">Name</option>
145+
<option value="-size">Size</option>
145146
</select>
146147
</div>
147148
<div class="button large-2 small-2 culumns" ng-click="toggleFiltersButton()" ng-class="{disabled: loading}">

js/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ this.GitHubCtrl = function($scope, $sce, $filter, DatasAdobe, DatasAdobeOffline,
152152

153153
$scope.updateGraph = function() {
154154
// Filtering langs for only major ones
155-
var majorLangs = $scope.filter('majorLangs')($scope.langs, $scope.stats.nbLinesCode);
155+
var majorLangs = $scope.filter('majorLangs')($scope.langs, $scope.stats.bitesLangCode);
156156

157157
//Initiate graphs
158158
// var langChart = dc.pieChart("#langChart");
@@ -169,7 +169,7 @@ this.GitHubCtrl = function($scope, $sce, $filter, DatasAdobe, DatasAdobeOffline,
169169
});
170170
langChart.width(220).height(180).dimension(langsDim).group(langsGroup).margins({top: 0, left: 0, right: 0, bottom: 20})
171171
.title(function(d) {
172-
return d.key+ ' (' + Math.round((d.value / $scope.stats.nbLinesCode)*100) + '%)';
172+
return d.key+ ' (' + Math.round((d.value / $scope.stats.bitesLangCode)*100) + '%)';
173173
}).label(function(d) {
174174
return d.key;
175175
}).renderLabel(true).colors(d3.scale.category20());

views/stats.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<li><strong>{{projects.length}}</strong> public repos</li>
33
<li><strong>{{orgs.length}}</strong> organisations</li>
44
<li><strong>{{langs.length}}</strong> languages</li>
5-
<li><strong>{{stats.nbLinesCode | unitNum}}bytes</strong> of code</li>
5+
<li><strong>{{stats.bitesCode | unitNum}}bytes</strong> of code</li>
66
<li><strong>{{projects[0].pushed_at | timeDiff}}</strong> since last commit</li>
77
</ul>

0 commit comments

Comments
 (0)