diff options
-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;"> |