Skip to content

Commit 14c8a15

Browse files
committed
Bugfix labels bar chart -> full css
1 parent f2df4ad commit 14c8a15

File tree

3 files changed

+138
-120
lines changed

3 files changed

+138
-120
lines changed

js/script.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ this.GitHubCtrl = function($scope, $sce, $filter, DatasAdobe, DatasAdobeOffline,
140140
});
141141

142142
$scope.updateGraph();
143-
$scope.posLabel();
144143

145144
//Loading over
146145
$scope.loading = false;
@@ -163,23 +162,14 @@ this.GitHubCtrl = function($scope, $sce, $filter, DatasAdobe, DatasAdobeOffline,
163162
}).order(function(d) {
164163
return d.value;
165164
});
166-
langChart.width(220).height(180).dimension(langsDim).group(langsGroup).margins({top: 0, left: 80, right: 0, bottom: 20})
165+
langChart.width(220).height(180).dimension(langsDim).group(langsGroup).margins({top: 0, left: 0, right: 0, bottom: 20})
167166
.title(function(d) {
168167
return d.key+ ' (' + Math.round((d.value / $scope.stats.nbLinesCode)*100) + '%)';
169168
}).label(function(d) {
170169
return d.key;
171170
}).renderLabel(true).colors(d3.scale.category20());
172171
dc.renderAll();
173172
}
174-
175-
$scope.posLabel = function() {
176-
$('.dc-chart svg .row text').each(function(index) {
177-
var actText = $('.dc-chart svg .row text')[index];
178-
179-
var newX = - $(actText).attr('x') - $(actText).width();
180-
$(actText).attr('x', newX);
181-
});
182-
}
183173

184174
$scope.showHideProj = function() {
185175
if ($scope.projLast == 10) {

0 commit comments

Comments
 (0)