From 0ef495b69d99c53e7a6a216e6748898dbcc79eec Mon Sep 17 00:00:00 2001
From: zsloan
Date: Tue, 5 Jan 2021 15:24:10 -0600
Subject: Fixed issue where normalization method wasn't removed from stats
figure axis titles when table values are reset
---
wqflask/wqflask/static/new/javascript/show_trait.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 832dd1e4..765f2f2d 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -207,6 +207,8 @@ update_histogram = function() {
if ($('input[name="transform"]').val() != ""){
root.histogram_layout['xaxis']['title'] = "" + js_data.unit_type + " (" + $('input[name="transform"]').val() + ")"
+ } else {
+ root.histogram_layout['xaxis']['title'] = "" + js_data.unit_type + ""
}
Plotly.newPlot('histogram', root.histogram_data, root.histogram_layout, root.modebar_options);
@@ -255,6 +257,8 @@ update_bar_chart = function() {
if ($('input[name="transform"]').val() != ""){
root.bar_layout['yaxis']['title'] = "" + js_data.unit_type + " (" + $('input[name="transform"]').val() + ")"
+ } else {
+ root.bar_layout['yaxis']['title'] = "" + js_data.unit_type + ""
}
root.bar_data[0]['y'] = trait_vals
@@ -296,6 +300,8 @@ update_box_plot = function() {
if ($('input[name="transform"]').val() != ""){
root.box_layout['yaxis']['title'] = "" + js_data.unit_type + " (" + $('input[name="transform"]').val() + ")"
+ } else {
+ root.box_layout['yaxis']['title'] = "" + js_data.unit_type + ""
}
Plotly.newPlot('box_plot', root.box_data, root.box_layout, root.modebar_options)
@@ -327,6 +333,8 @@ update_violin_plot = function() {
if ($('input[name="transform"]').val() != ""){
root.violin_layout['yaxis']['title'] = "" + js_data.unit_type + " (" + $('input[name="transform"]').val() + ")"
+ } else {
+ root.violin_layout['yaxis']['title'] = "" + js_data.unit_type + ""
}
Plotly.newPlot('violin_plot', root.violin_data, root.violin_layout, root.modebar_options)
@@ -795,6 +803,7 @@ reset_samples_table = function() {
};
$('.reset').click(function() {
reset_samples_table();
+ $('input[name="transform"]').val("");
edit_data_change();
});
--
cgit v1.2.3