mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-16 12:40:07 -04:00
Eslint clean ups
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
Currently these are used for HorizontalBarGraph.
|
||||
*/
|
||||
|
||||
|
||||
var growstuff = (window.growstuff = window.growstuff || {});
|
||||
var WidthScale = growstuff.WidthScale;
|
||||
var HeightScale = growstuff.HeightScale;
|
||||
@@ -54,11 +53,11 @@ BarGroup.prototype.getBarValues = function () {
|
||||
|
||||
for (i; i < data.bars.length; i++){
|
||||
barValues.push(data.bars[i].value)
|
||||
};
|
||||
}
|
||||
|
||||
return barValues;
|
||||
};
|
||||
};
|
||||
|
||||
growstuff.BarGroup = BarGroup;
|
||||
|
||||
})();
|
||||
}());
|
||||
@@ -37,4 +37,4 @@ This file draws the labels to the left of each bar.
|
||||
|
||||
growstuff.BarLabelGroup = BarLabelGroup;
|
||||
|
||||
})();
|
||||
}())
|
||||
@@ -12,7 +12,7 @@ the svg
|
||||
|
||||
function HeightScale(data){
|
||||
this._data = data;
|
||||
};
|
||||
}
|
||||
|
||||
HeightScale.prototype.render = function(){
|
||||
var data = this._data;
|
||||
@@ -26,4 +26,4 @@ the svg
|
||||
|
||||
growstuff.HeightScale = HeightScale;
|
||||
|
||||
})();
|
||||
}());
|
||||
@@ -50,4 +50,4 @@ The main dimensions of the graph are rendered here.
|
||||
};
|
||||
|
||||
growstuff.HorizontalBarGraph = HorizontalBarGraph;
|
||||
})();
|
||||
}());
|
||||
@@ -12,19 +12,16 @@ to the display size of the svg
|
||||
|
||||
function WidthScale (data){
|
||||
this._data = data;
|
||||
};
|
||||
}
|
||||
|
||||
WidthScale.prototype.render = function() {
|
||||
var data = this._data;
|
||||
var scaleType = data.width.scale;
|
||||
var axisSize = data.width.size;
|
||||
|
||||
|
||||
return d3.scale[scaleType]()
|
||||
.domain([0, d3.max(this.getBarValues())])
|
||||
.range([0, axisSize]);
|
||||
|
||||
|
||||
};
|
||||
|
||||
WidthScale.prototype.getBarValues = function(){
|
||||
@@ -35,11 +32,11 @@ to the display size of the svg
|
||||
|
||||
for (i; i < data.bars.length; i++){
|
||||
barValues.push(data.bars[i].value)
|
||||
};
|
||||
}
|
||||
|
||||
return barValues;
|
||||
}
|
||||
|
||||
growstuff.WidthScale = WidthScale;
|
||||
|
||||
})();
|
||||
}());
|
||||
@@ -62,4 +62,4 @@
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
}());
|
||||
@@ -1,4 +1,4 @@
|
||||
function(){
|
||||
(function(){
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
@@ -39,4 +39,4 @@ function(){
|
||||
|
||||
});
|
||||
|
||||
}();
|
||||
}());
|
||||
@@ -34,4 +34,4 @@
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
}());
|
||||
@@ -72,4 +72,4 @@
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
}());
|
||||
|
||||
@@ -36,10 +36,6 @@
|
||||
it ('calls the d3 range function to draw the width', function(){
|
||||
expect(mockD3.range).toHaveBeenCalledWith([0, 300]);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
}());
|
||||
Reference in New Issue
Block a user