aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-10-06 12:10:36 +0300
committerFrederick Muriuki Muriithi2021-10-06 12:17:47 +0300
commita99bd2cef7fda9b6ec44d49f9f12aa040ca55136 (patch)
treecfc9a94bd70e9d1b193d4c9916312135b4532241
parentec9ec225292130ee7ff625eaf9b70e2924f5ffe6 (diff)
downloadgenenetwork2-a99bd2cef7fda9b6ec44d49f9f12aa040ca55136.tar.gz
Enable selection of heatmap orientation
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/non-clustered-heatmaps-and-flipping.gmi * Provide the user with the UI elements to enable them select the orientation of the heatmap that will be produced.
-rw-r--r--wqflask/wqflask/templates/collections/view.html18
1 files changed, 17 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index 05186560..c5479b17 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -37,6 +37,19 @@
<div>
<br />
<form id="heatmaps_form">
+ <fieldset>
+ <legend>Heatmap Orientation</legend>
+ <label for="heatmap-orient-vertical">Vertical</label>
+ <input id="heatmap-orient-vertical"
+ type="radio"
+ name="vertical"
+ value="true" />
+ <label for="heatmap-orient-horizontal">Horizontal</label>
+ <input id="heatmap-orient-horizontal"
+ type="radio"
+ name="vertical"
+ value="false" />
+ </fieldset>
<button id="clustered-heatmap"
class="btn btn-primary"
data-url="{{heatmap_data_url}}"
@@ -310,6 +323,8 @@
$("#clustered-heatmap").on("click", function() {
clear_heatmap_area();
intv = window.setInterval(generate_progress_indicator(), 300);
+ vert_element = document.getElementById("heatmap-orient-vertical");
+ vert_true = vert_element == null ? false : vert_element.checked;
heatmap_url = $(this).attr("data-url")
traits = $(".trait_checkbox:checked").map(function() {
return this.value
@@ -319,7 +334,8 @@
url: heatmap_url,
contentType: "application/json",
data: JSON.stringify({
- "traits_names": traits
+ "traits_names": traits,
+ "vertical": vert_true
}),
dataType: "JSON",
success: function(data, status, xhr) {