diff options
author | zsloan | 2020-05-18 11:48:50 -0500 |
---|---|---|
committer | zsloan | 2020-05-18 11:48:50 -0500 |
commit | 9d0c8a43cdcfb5ee7c30897495b4617d58f98386 (patch) | |
tree | f0e39f3b93a97b8c15a6525b96c66f45b5a87500 /wqflask | |
parent | 81205be9a657c3fb350fe797ecefe615c0b9a4b7 (diff) | |
download | genenetwork2-9d0c8a43cdcfb5ee7c30897495b4617d58f98386.tar.gz |
Fixed Bar Chart left margin issue and fixed issue where 0 values didn't have +1 added when doing log transforms
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 785e5332..2f276021 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -758,7 +758,7 @@ check_for_zero_to_one_vals = function() { return; } else { current_value = parseFloat(current_value) - if (0 < current_value && current_value < 1){ + if (0 <= current_value && current_value < 1){ zero_to_one_vals_exist = true return false; } @@ -1033,12 +1033,16 @@ val_range = root.chart_range[1] - root.chart_range[0] if (val_range < 0.05){ tick_digits = '.3f' + left_margin = 80 } else if (val_range < 0.5) { tick_digits = '.2f' + left_margin = 70 } else if (val_range < 5){ tick_digits = '.1f' + left_margin = 60 } else { tick_digits = 'f' + left_margin = 55 } if (js_data.num_values < 256) { @@ -1077,7 +1081,7 @@ if (js_data.num_values < 256) { width: bar_chart_width, height: 600, margin: { - l: 55, + l: left_margin, r: 30, t: 30, b: bottom_margin |