Skip to content

Commit aad94d8

Browse files
committed
eslint
1 parent 652ad7c commit aad94d8

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/angular-graphs.bar.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ angular.module('picardy.graphs.bar', ['picardy.graphs.common'])
55

66
function render (scope, element) {
77

8-
var _data, d3Data, options, getColor, svg, margin, width, height, x, y, labels, axes, bars, info;
8+
var _data, options, getColor, svg, margin, width, height, x, y, labels, axes, bars, info;
99

1010
if (!scope.data) {
1111
return;
1212
}
1313

1414
_data = angular.copy(scope.data);
1515
getColor = common.colors(_data.colors);
16-
d3Data = [];
1716

1817
options = common.defaults(_data, {
1918
height: 300,
@@ -36,8 +35,12 @@ angular.module('picardy.graphs.bar', ['picardy.graphs.common'])
3635
x = d3.scale.ordinal().rangeRoundBands([0, width], 0.2);
3736
y = d3.scale.linear().range([height, 0]);
3837

39-
x.domain(_data.data.map(function(d) { return d.x; }));
40-
y.domain([0, d3.max(_data.data, function(d) { return d.y; })]);
38+
x.domain(_data.data.map(function (d) {
39+
return d.x;
40+
}));
41+
y.domain([0, d3.max(_data.data, function (d) {
42+
return d.y;
43+
})]);
4144

4245
function drawAxes () {
4346
var xAxis, yAxis;
@@ -57,7 +60,7 @@ angular.module('picardy.graphs.bar', ['picardy.graphs.common'])
5760
append('g').
5861
attr({
5962
'class': 'x axis',
60-
'transform': common.translate(margin.left, height+1)
63+
'transform': common.translate(margin.left, height + 1)
6164
}).
6265
call(xAxis).
6366
selectAll('text').
@@ -104,7 +107,7 @@ angular.module('picardy.graphs.bar', ['picardy.graphs.common'])
104107
info.
105108
append('text').
106109
attr({
107-
'transform': common.translate(margin.left + x(d.x) + x.rangeBand()/2, height+40),
110+
'transform': common.translate(margin.left + x(d.x) + x.rangeBand() / 2, height + 40),
108111
'text-anchor': 'middle',
109112
'alignment-baseline': 'central'
110113
})
@@ -137,7 +140,7 @@ angular.module('picardy.graphs.bar', ['picardy.graphs.common'])
137140
'width': x.rangeBand(),
138141
'height': 0,
139142
'transform': function (d) {
140-
return common.translate(margin.left + x(d.x), height+1);
143+
return common.translate(margin.left + x(d.x), height + 1);
141144
},
142145
'fill': getColor('bars')
143146
})
@@ -147,7 +150,7 @@ angular.module('picardy.graphs.bar', ['picardy.graphs.common'])
147150
}).
148151
transition().delay(delay).duration(duration).
149152
attr('transform', function (d) {
150-
return common.translate(margin.left + x(d.x), y(d.y)+1);
153+
return common.translate(margin.left + x(d.x), y(d.y) + 1);
151154
}).
152155
attr('height', function (d) {
153156
return height - y(d.y);

0 commit comments

Comments
 (0)