Skip to content

Commit

Permalink
moving location of new graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Breslav committed Jul 29, 2019
1 parent e7209a3 commit 2be2312
Show file tree
Hide file tree
Showing 4 changed files with 603 additions and 590 deletions.
3 changes: 1 addition & 2 deletions SeuratExtension/src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ <h2>Graph</h2>
<!--<p>
<input type="button" value="Draw graph" onclick="draw();" id="draw">
</p>-->
<div id="2dVectorGraph" style="width:700px;height:450px;padding-bottom: 3px;"></div>
<div id="2dGraph" style="width:700px;height:450px;padding-bottom: 3px;"></div>
<div id="3dGraph"></div>

Expand All @@ -47,7 +46,7 @@ <h2>Statistics</h2>
<textarea id="detailArea" rows="20" style="margin:50px;" cols="50">

</textarea>

<div id="2dVectorGraph" style="width:700px;height:450px;padding-bottom: 3px;"></div>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ <h2>Graph</h2>
<!--<p>
<input type="button" value="Draw graph" onclick="draw();" id="draw">
</p>-->
<div id="2dVectorGraph" style="width:700px;height:450px;padding-bottom: 3px;"></div>
<div id="2dGraph" style="width:700px;height:450px;padding-bottom: 3px;"></div>
<div id="3dGraph"></div>

Expand All @@ -47,7 +46,7 @@ <h2>Statistics</h2>
<textarea id="detailArea" rows="20" style="margin:50px;" cols="50">

</textarea>

<div id="2dVectorGraph" style="width:700px;height:450px;padding-bottom: 3px;"></div>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function load() {

Graph2D.on('plotly_click', function(data){
var pts = '';
console.log(data);
//console.log(data);
var value = "";
for(var i=0; i < 1; i++){ //data.points.length; i++){
value += "id:" + data.points[i].pointIndex + "\n";
Expand All @@ -34,6 +34,21 @@ function load() {
}
document.getElementById("detailArea").value = value;
});

Graph2DVector.on('plotly_click', function(data){
var pts = '';
//console.log(data);
var value = "";
for(var i=0; i < 1; i++){ //data.points.length; i++){
value += "id:" + data.points[i].pointIndex + "\n";
value += "X:" + data.points[i].x + "\n";
value += "Y:" + data.points[i].y + "\n";
for(var j=0; j < allLabels.length; j++){
value += allLabels[j] + ": " + allValues[data.points[i].pointIndex][j] + "\n";
}
}
document.getElementById("detailArea").value = value;
});
}

function round(value, decimals) {
Expand Down Expand Up @@ -181,8 +196,8 @@ function getVectorDataMetrics2D() {
x += (data[i2][j2] / maxVals[j2]) * dataStream[0].x[j2];
y += (data[i2][j2] / maxVals[j2]) * dataStream[0].y[j2];
}
//x /= labels.length;
//y /= labels.length;
x /= labels.length;
y /= labels.length;

dataStream[1].x.push(x);
dataStream[1].y.push(y);
Expand Down
Loading

0 comments on commit 2be2312

Please sign in to comment.