diff options
author | zsloan | 2023-12-21 21:01:44 +0000 |
---|---|---|
committer | zsloan | 2023-12-21 21:01:44 +0000 |
commit | 10d4ef28bfede5c272c8aa59af81710e9ada3004 (patch) | |
tree | 50658c8877a3a1d9f61973e7388ac62528affbb3 /wqflask | |
parent | 213957275f3b792d53191c74d83fb5a1293f0fd5 (diff) | |
download | genenetwork2-10d4ef28bfede5c272c8aa59af81710e9ada3004.tar.gz |
Add option to invert X and Y axes for scatterplot
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js | 6 | ||||
-rw-r--r-- | wqflask/wqflask/templates/corr_scatterplot.html | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js index 4a8b724d..f883c0d9 100644 --- a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js +++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js @@ -904,4 +904,10 @@ $(document).ready(function(){ remove_cofactors(); }); + $('#invert_axes').click(function () { + var [dataset_1, trait_1] = js_data.trait_2.split(": ") + var [dataset_2, trait_2] = js_data.trait_1.split(": ") + window.location.replace("/corr_scatter_plot?method=pearson&dataset_1=" + dataset_1 + "&dataset_2=" + dataset_2 + "&trait_1=" + trait_1 + "&trait_2=" + trait_2) + }); + }); diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html index f6a0ff1f..554471be 100644 --- a/wqflask/wqflask/templates/corr_scatterplot.html +++ b/wqflask/wqflask/templates/corr_scatterplot.html @@ -28,7 +28,10 @@ <table> <tr> <td style="vertical-align: middle;">Width <input class="chartupdatewh" id="width" type="text" value="800" style="width: 44px; height: 22px;"> px </td> - <td style="vertical-align: middle;">Height <input class="chartupdatewh" id="height" type="text" value="700" style="width: 44px; height: 22px;"> px</td> + <td style="vertical-align: middle; padding-left: 5px;">Height <input class="chartupdatewh" id="height" type="text" value="700" style="width: 44px; height: 22px;"> px</td> + <td style="vertical-align: middle; padding-left: 5px;"><button type="button" class="btn btn-default" id="invert_axes"> + Invert Axes + </button></td> </tr> </table> <hr style="height: 1px; background-color: #A9A9A9;"> |