aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-03-15 15:03:15 -0500
committerGN22020-03-19 11:47:37 -0500
commitdbaea134b1cee2a9cdc4968dac50e50e44c162bb (patch)
tree185834a5547164663ca088f8e6eee2576b24ee28 /wqflask
parent79aec8e686e83d5f5ed3b65b450b44648c799d1e (diff)
downloadgenenetwork2-dbaea134b1cee2a9cdc4968dac50e50e44c162bb.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