aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwqflask/wqflask/static/new/javascript/histogram.coffee6
-rwxr-xr-xwqflask/wqflask/static/new/javascript/histogram.js7
-rwxr-xr-xwqflask/wqflask/static/new/javascript/show_trait.coffee1
-rwxr-xr-xwqflask/wqflask/static/new/javascript/show_trait.js1
4 files changed, 9 insertions, 6 deletions
diff --git a/wqflask/wqflask/static/new/javascript/histogram.coffee b/wqflask/wqflask/static/new/javascript/histogram.coffee
index b27a389e..68d9b5a2 100755
--- a/wqflask/wqflask/static/new/javascript/histogram.coffee
+++ b/wqflask/wqflask/static/new/javascript/histogram.coffee
@@ -13,10 +13,10 @@ class Histogram
@y_buffer = @plot_height/20
@plot_height -= @y_buffer
- @redraw(@sample_list)
+ @get_sample_vals(@sample_list)
+ @redraw(@sample_vals)
- redraw: (sample_list) ->
- @get_sample_vals(sample_list)
+ redraw: (@sample_vals) ->
@y_min = d3.min(@sample_vals)
@y_max = d3.max(@sample_vals) * 1.1
diff --git a/wqflask/wqflask/static/new/javascript/histogram.js b/wqflask/wqflask/static/new/javascript/histogram.js
index 94144661..d872a3ba 100755
--- a/wqflask/wqflask/static/new/javascript/histogram.js
+++ b/wqflask/wqflask/static/new/javascript/histogram.js
@@ -21,11 +21,12 @@
this.x_buffer = this.plot_width / 20;
this.y_buffer = this.plot_height / 20;
this.plot_height -= this.y_buffer;
- this.redraw(this.sample_list);
+ this.get_sample_vals(this.sample_list);
+ this.redraw(this.sample_vals);
}
- Histogram.prototype.redraw = function(sample_list) {
- this.get_sample_vals(sample_list);
+ Histogram.prototype.redraw = function(sample_vals) {
+ this.sample_vals = sample_vals;
this.y_min = d3.min(this.sample_vals);
this.y_max = d3.max(this.sample_vals) * 1.1;
this.create_x_scale();
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.coffee b/wqflask/wqflask/static/new/javascript/show_trait.coffee
index ee57831f..1d3123ba 100755
--- a/wqflask/wqflask/static/new/javascript/show_trait.coffee
+++ b/wqflask/wqflask/static/new/javascript/show_trait.coffee
@@ -238,6 +238,7 @@ $ ->
sample_sets['samples_all'].add_value(real_value)
already_seen[name] = true
console.log("towards end:", sample_sets)
+ root.histogram.redraw(sample_sets['samples_primary'].the_values)
update_stat_values(sample_sets)
show_hide_outliers = ->
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index c2dc07ee..9323862a 100755
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -265,6 +265,7 @@
}
}
console.log("towards end:", sample_sets);
+ root.histogram.redraw(sample_sets['samples_primary'].the_values);
return update_stat_values(sample_sets);
};
show_hide_outliers = function() {