From a2dba7af9613a827d2975b9d322d4eefc5659b4e Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 18 Feb 2020 11:39:45 -0600 Subject: Added log10 transform Fixed Y axis for bar chart and histogram, so it doesn't change when you zoom in or out --- wqflask/wqflask/static/new/javascript/show_trait.js | 20 ++++++++++++++++++-- .../templates/show_trait_transform_and_filter.html | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 96b7c305..819c4d12 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -569,6 +569,20 @@ block_by_index = function() { _ref = index_string.split(","); for (_i = 0, _len = _ref.length; _i < _len; _i++) { index_set = _ref[_i]; + /* + if (index_set.indexOf('<') !== -1) { + try { + start_index = parseInt(index_set.split("<")[0]); + end_index = parseInt(index_set.split("<")[1]); + for (index = _j = start_index; start_index <= end_index ? _j <= end_index : _j >= end_index; index = start_index <= end_index ? ++_j : --_j) { + index_list.push(index); + } + } catch (_error) { + error = _error; + alert("Syntax error"); + } + } + */ if (index_set.indexOf('-') !== -1) { try { start_index = parseInt(index_set.split("-")[0]); @@ -1041,7 +1055,8 @@ if (js_data.num_values < 256) { tickfont: { size: 16 }, - tickformat: tick_digits + tickformat: tick_digits, + fixedrange: true }, width: bar_chart_width, height: 600, @@ -1096,7 +1111,8 @@ root.histogram_layout = { tickfont: { size: 16 }, - automargin: true + automargin: true, + fixedrange: true }, width: 500, height: 600, diff --git a/wqflask/wqflask/templates/show_trait_transform_and_filter.html b/wqflask/wqflask/templates/show_trait_transform_and_filter.html index fbdebcd0..4be6d249 100644 --- a/wqflask/wqflask/templates/show_trait_transform_and_filter.html +++ b/wqflask/wqflask/templates/show_trait_transform_and_filter.html @@ -52,6 +52,7 @@