spec/dummy/tmp/cache/assets/development/sprockets/1c55cf24465f311353197ce336df0178 in prosperity-0.0.6 vs spec/dummy/tmp/cache/assets/development/sprockets/1c55cf24465f311353197ce336df0178 in prosperity-0.0.7
- old
+ new
@@ -1,8 +1,8 @@
{I"
class:ETI"BundledAsset; FI"logical_path; TI"prosperity/application.js; TI"
pathname; TI"i/Users/simon/Documents/rainforest/prosperity/app/assets/javascripts/prosperity/application.js.coffee; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+vSI"length; TiI"digest; TI"%acf755b0d48895e863243218e93fb1c1; FI"source; TI"/*!
+mtime; Tl+ҖvSI"length; Ti I"digest; TI"%b1a3f4f85e8ed65b1f7f5c201c584b80; FI"source; TI" /*!
* jQuery JavaScript Library v1.11.0
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
@@ -10780,13 +10780,15 @@
function SubGraph(options) {
var chartEl;
if (options == null) {
options = {};
}
+ this["class"] = __bind(this["class"], this);
this.el = $('<div>', {
"class": 'sub-graph'
});
+ this.graphType = options.graphType;
if (options.showTitle) {
this.el.append("<div class='title'>Loading...</div>");
}
this.el.find('.title').html(options.label);
chartEl = $('<div>', {
@@ -10824,12 +10826,20 @@
this.chartOptions.ykeys.push(json.uid);
this.chartOptions.labels.push(json.uid);
return this.el;
};
+ SubGraph.prototype["class"] = function() {
+ if (this.graphType === 'area') {
+ return Morris.Area;
+ } else {
+ return Morris.Line;
+ }
+ };
+
SubGraph.prototype.draw = function() {
- return this.chart = new Morris.Line(this.chartOptions);
+ return this.chart = new this["class"]()(this.chartOptions);
};
return SubGraph;
})();
@@ -10854,11 +10864,12 @@
extractor = _ref[index];
_results.push($.get(extractor.url, function(line_json) {
var subgraph;
subgraph = _this.getSubgraph({
label: line_json.label,
- key: line_json.key
+ key: line_json.key,
+ graphType: json.graph_type
});
subgraph.addSeries(line_json);
if (_this.$el.hasClass('dashboard')) {
if (subgraph.chartOptions.ykeys.length === json.extractors.length) {
return subgraph.draw();
@@ -10948,6 +10959,6 @@
}).render();
});
});
}).call(this);
-; TI"required_assets_digest; TI"%6201e842cad4c58b38022630d9472e4a; FI"
_version; TI"%361c512b9086418778df946c0d278f91; F
+; TI"required_assets_digest; TI"%3e4ea6306927fe619a5a66d5a787bf88; FI"
_version; TI"%361c512b9086418778df946c0d278f91; F
\ No newline at end of file