[#80,refactor][xs]: switch to _.each in view-graph.js.

This commit is contained in:
Rufus Pollock 2012-04-15 17:00:42 +01:00
parent cb51f485c0
commit 2515658a0b

View File

@ -275,9 +275,9 @@ my.Graph = Backbone.View.extend({
createSeries: function () {
var self = this;
var series = [];
$.each(this.state.attributes.series, function (seriesIndex, field) {
_.each(this.state.attributes.series, function(field) {
var points = [];
$.each(self.model.currentDocuments.models, function (index, doc) {
_.each(self.model.currentDocuments.models, function(doc, index) {
var x = doc.get(self.state.attributes.group);
var y = doc.get(field);
if (typeof x === 'string') {