aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2022-03-18 14:56:57 +0300
committerAlexander Kabui2022-03-18 14:56:57 +0300
commitb158f11588afc4c93c5daf17ed0195f392e2e2d7 (patch)
treeaad8e0e072adb403f781443ee09a7e5c7a659d07
parent205ebb2d9501f431984359b15467cf573803b0a4 (diff)
downloadgenenetwork2-b158f11588afc4c93c5daf17ed0195f392e2e2d7.tar.gz
integrate scree plot
-rw-r--r--wqflask/wqflask/templates/correlation_matrix.html6
-rw-r--r--wqflask/wqflask/templates/pca_scree_plot.html6
2 files changed, 9 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/correlation_matrix.html b/wqflask/wqflask/templates/correlation_matrix.html
index 3da6981c..e90accf2 100644
--- a/wqflask/wqflask/templates/correlation_matrix.html
+++ b/wqflask/wqflask/templates/correlation_matrix.html
@@ -71,6 +71,12 @@
<button class="btn btn-default" id="export">Download <span class="glyphicon glyphicon-download"></span></button>
</form>
<br>
+
+<div style="margin:20x;">
+ {% include 'pca_scree_plot.html' %}
+
+</div>
+
{% if pca_works == "True" %}
<h2>PCA Traits</h2>
<div style="margin-bottom: 20px; overflow:hidden; width: 450px;">
diff --git a/wqflask/wqflask/templates/pca_scree_plot.html b/wqflask/wqflask/templates/pca_scree_plot.html
index 41036333..b0ef78d0 100644
--- a/wqflask/wqflask/templates/pca_scree_plot.html
+++ b/wqflask/wqflask/templates/pca_scree_plot.html
@@ -15,11 +15,11 @@
</body>
<script type="text/javascript" src="{{ url_for('js', filename='plotly/plotly.min.js') }}"></script>
<script type="text/javascript">
-js_data = { { js_data | safe } }
-
+js_data = {{ js_data | safe }}
let { x_coord, y_coord } = js_data["scree_data"]
+
const layout = {
title: {
@@ -87,7 +87,7 @@ let custom_configs = (filename, download_format, modebar = true) => {
}
-Plotly.newPlot(document.getElementById(), data, layout,
+Plotly.newPlot(document.getElementById("scree_plot"), data, layout,
custom_configs(file_name = "scree_plot", download_format = "svg"));
</script>