From a7978f4d41531dd839101e9059ac2ff7e7ed8977 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 4 Dec 2019 13:09:00 -0600 Subject: Made some minor changes to scatterplot page --- wqflask/wqflask/correlation/corr_scatter_plot.py | 4 ++-- .../wqflask/static/new/javascript/draw_corr_scatterplot.js | 9 +++++++-- wqflask/wqflask/templates/corr_scatterplot.html | 14 +++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/corr_scatter_plot.py b/wqflask/wqflask/correlation/corr_scatter_plot.py index e7fe8b91..f8eca386 100644 --- a/wqflask/wqflask/correlation/corr_scatter_plot.py +++ b/wqflask/wqflask/correlation/corr_scatter_plot.py @@ -42,7 +42,7 @@ class CorrScatterPlot(object): if slope < 0.001: slope_string = '%.3E' % slope else: - slope_string = str(slope) + slope_string = '%.3f' % slope x_buffer = (max(vals_1) - min(vals_1))*0.1 y_buffer = (max(vals_2) - min(vals_2))*0.1 @@ -62,7 +62,7 @@ class CorrScatterPlot(object): if srslope < 0.001: srslope_string = '%.3E' % srslope else: - srslope_string = str(srslope) + srslope_string = '%.3f' % srslope x_buffer = (max(rx) - min(rx))*0.1 y_buffer = (max(ry) - min(ry))*0.1 diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js index 8fdbad35..9ab0727c 100644 --- a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js +++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js @@ -142,7 +142,8 @@ function drawg() { x: x_values, y: y_values, mode: 'markers', - text: sample_names + text: sample_names, + hoverinfo: "text+x+y" } var trace2 = { @@ -172,7 +173,8 @@ function srdrawg() { x: x_values, y: y_values, mode: 'markers', - text: sample_names + text: sample_names, + hoverinfo: "text+x+y" } Plotly.newPlot('srscatterplot2', [trace1], sr_layout) @@ -361,6 +363,7 @@ function getdata() { y: y_values, mode: 'markers', text: point_text, + hoverinfo: "text+x+y", marker: { color: 'rgb(66, 66, 245)', symbol: symbol_list, @@ -373,6 +376,7 @@ function getdata() { y: y_values, mode: 'markers', text: point_text, + hoverinfo: "text+x+y", marker: { color: 'rgb(66, 66, 245)', size: sizes @@ -578,6 +582,7 @@ function srgetdata() { y: y_values, mode: 'markers', text: point_text, + hoverinfo: "text+x+y", marker: { color: 'rgb(66, 66, 245)', symbol: symbol_list, diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html index a8d65169..ffc8244d 100644 --- a/wqflask/wqflask/templates/corr_scatterplot.html +++ b/wqflask/wqflask/templates/corr_scatterplot.html @@ -126,13 +126,13 @@ -