From f0f97202cf77a4459dd7ca525e94e34a56ddb147 Mon Sep 17 00:00:00 2001 From: zsloan Date: Sun, 15 Mar 2020 15:03:15 -0500 Subject: Fixed digits issue, though still need to figure out how to increase gap between y axis and title --- wqflask/wqflask/static/new/javascript/show_trait.js | 8 +++++--- 1 file 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: "" + js_data.unit_type + "", range: root.chart_range, titlefont: { size: 16 -- cgit v1.2.3