aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-03-15 15:03:15 -0500
committerzsloan2020-03-15 15:03:15 -0500
commitf0f97202cf77a4459dd7ca525e94e34a56ddb147 (patch)
treece2f7819890fff9f3d8708cb6a06ab1bca775b07 /wqflask
parentbb1f854ca7acdd4b234c9744725fce50bf0ea2d8 (diff)
downloadgenenetwork2-f0f97202cf77a4459dd7ca525e94e34a56ddb147.tar.gz
Fixed digits issue, though still need to figure out how to increase gap between y axis and title
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 819c4d12..0162f858 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -1017,10 +1017,12 @@ get_bar_range = function(sample_vals, sample_errors = null){
root.chart_range = get_bar_range(get_sample_vals(sample_lists[0]), get_sample_errors(sample_lists[0])[0])
val_range = root.chart_range[1] - root.chart_range[0]
-if (val_range < 5){
- tick_digits = '.1f'
+if (val_range < 0.05){
+ tick_digits = '.3f'
} else if (val_range < 0.5) {
tick_digits = '.2f'
+} else if (val_range < 5){
+ tick_digits = '.1f'
} else {
tick_digits = 'f'
}
@@ -1045,7 +1047,7 @@ if (js_data.num_values < 256) {
},
},
yaxis: {
- title: js_data.unit_type,
+ title: "<b>" + js_data.unit_type + "</b>",
range: root.chart_range,
titlefont: {
size: 16