diff options
author | Lei Yan | 2017-09-12 21:33:20 +0000 |
---|---|---|
committer | Lei Yan | 2017-09-12 21:33:20 +0000 |
commit | 3adc1de4973bc5b92b88c7d8865ff1ec18e67965 (patch) | |
tree | b9ce70019d917961bc6ae8a2ef2d88dd0dd65c6e /wqflask | |
parent | 28a128b242af78941b7511e8f84ca5d61a19997c (diff) | |
download | genenetwork2-3adc1de4973bc5b92b88c7d8865ff1ec18e67965.tar.gz |
change corr_scatterplot precision format
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js | 6 | ||||
-rw-r--r-- | wqflask/wqflask/templates/corr_scatterplot.html | 36 |
2 files changed, 24 insertions, 18 deletions
diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js index 17f939cc..4a0f2c55 100644 --- a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js +++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot-2.js @@ -93,6 +93,12 @@ function chartupdate() { // var clinewidth = $("#clinewidth").val(); $("line.nv-regLine").css("stroke-width", clinewidth); + // + var axiscolor = $("#axiscolor").val(); + $(".tick").css("stroke", axiscolor); + // + var axiswidth = $("#axiswidth").val(); + $("line.nv-regLine").css("stroke-width", axiswidth); } function chartupdatewh() { diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html index fc9925e7..227e1116 100644 --- a/wqflask/wqflask/templates/corr_scatterplot.html +++ b/wqflask/wqflask/templates/corr_scatterplot.html @@ -91,6 +91,9 @@ <td>Correlation Line Color</td>
<td><input class="chartupdate" id="clinecolor" type="color" value="#000000"></td>
+ <td>Axis Line Color</td>
+ <td><input class="chartupdate" id="axiscolor" type="color" value="#000000"></td>
+
</tr>
<tr>
@@ -109,6 +112,9 @@ <td>Correlation Line Width</td>
<td><input class="chartupdate" id="clinewidth" type="text" value="1" style="width: 44px;"> px</td>
+ <td>Axis Line Width</td>
+ <td><input class="chartupdate" id="axiswidth" type="text" value="1" style="width: 44px;"> px</td>
+
</tr>
</table>
@@ -129,7 +135,10 @@ <td>Width</td>
<td><input class="chartupdatewh" id="width" type="text" value="1000" style="width: 44px;"> px</td>
- <td>Mark Size</td>
+ <td>Height</td>
+ <td><input class="chartupdatewh" id="height" type="text" value="800" style="width: 44px;"> px</td>
+
+ <td>Size</td>
<td>
<select class="chartupdatedata" id="marksize" style="width: 100px;">
<option value="0">0</option>
@@ -146,13 +155,7 @@ </select>
</td>
- </tr>
- <tr>
-
- <td>Height</td>
- <td><input class="chartupdatewh" id="height" type="text" value="800" style="width: 44px;"> px</td>
-
- <td>Mark Shape</td>
+ <td>Shape</td>
<td>
<select class="chartupdatedata" id="markshape" style="width: 100px;">
<option value="circle" selected>Circle</option>
@@ -182,7 +185,7 @@ <tr><td>Slope</td> <td>{{'%0.3f' % jsdata.slope}}</td></tr>
<tr><td>Intercept</td> <td>{{'%0.3f' % jsdata.intercept}}</td></tr>
<tr><td>r value</td> <td>{{'%0.3f' % jsdata.r_value}}</td></tr>
- <tr><td>P value</td> <td>{{'%0.3e' % jsdata.p_value}}</td></tr>
+ <tr><td>P value</td> <td>{% if jsdata.p_value < 0.001 %}{{'%0.3e' % jsdata.p_value}}{% else %}{{'%0.3f' % jsdata.p_value}}{% endif %}</td></tr>
</tbody>
</table>
@@ -197,7 +200,10 @@ <td>Width</td>
<td><input class="srchartupdatewh" id="srwidth" type="text" value="1000" style="width: 44px;"> px</td>
- <td>Mark Size</td>
+ <td>Height</td>
+ <td><input class="srchartupdatewh" id="srheight" type="text" value="800" style="width: 44px;"> px</td>
+
+ <td>Size</td>
<td>
<select class="srchartupdatedata" id="srmarksize" style="width: 100px;">
<option value="0">0</option>
@@ -213,14 +219,8 @@ <option value="10">10</option>
</select>
</td>
-
- </tr>
- <tr>
-
- <td>Height</td>
- <td><input class="srchartupdatewh" id="srheight" type="text" value="800" style="width: 44px;"> px</td>
- <td>Mark Shape</td>
+ <td>Shape</td>
<td>
<select class="srchartupdatedata" id="srmarkshape" style="width: 100px;">
<option value="circle" selected>Circle</option>
@@ -250,7 +250,7 @@ <tr><td>Slope</td> <td>{{'%0.3f' % jsdata.srslope}}</td></tr>
<tr><td>Intercept</td> <td>{{'%0.3f' % jsdata.srintercept}}</td></tr>
<tr><td>r value</td> <td>{{'%0.3f' % jsdata.srr_value}}</td></tr>
- <tr><td>P value</td> <td>{{'%0.3e' % jsdata.srp_value}}</td></tr>
+ <tr><td>P value</td> <td>{% if jsdata.srp_value < 0.001 %}{{'%0.3e' % jsdata.srp_value}}{% else %}{{'%0.3f' % jsdata.srp_value}}{% endif %}</td></tr>
</tbody>
</table>
|