Skip to content

Commit

Permalink
Slight changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmisankepally committed Dec 12, 2019
1 parent f947f2e commit e756565
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/static/IRViz.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ graphDiv.layout = {
margin: {t: 1}
}
Plotly.react(graphDiv, graphDiv.data, graphDiv.layout);
$("select").on('change', function(event){
$("#mySelect").on('change', function(event){
var selected_stat = document.getElementById("mySelect").value;
if (selected_stat == 'Average'){
stat_value = 'mean';
Expand Down Expand Up @@ -210,9 +210,7 @@ Plotly.react(graphDiv, graphDiv.data, graphDiv.layout);
yref: 'y',
text: selected_stat+":"+stats_json.merged_stats[0][stat_value],
showarrow: true,
arrowhead: 7,
ax: 0,
ay: -40
arrowhead: 7
},
{
x: 8,
Expand All @@ -221,13 +219,10 @@ Plotly.react(graphDiv, graphDiv.data, graphDiv.layout);
yref: 'y',
text: selected_stat+":"+stats_json.merged_stats[1][stat_value],
showarrow: true,
arrowhead: 7,
ax: 0,
ay: -40
arrowhead: 7
}
],
shapes: [

{
type: 'line',
x0: 1,
Expand All @@ -252,6 +247,7 @@ Plotly.react(graphDiv, graphDiv.data, graphDiv.layout);
}
]
}
console.log(stats_json.merged_stats[0]);
Plotly.react(graphDiv, graphDiv.data, graphDiv.layout);
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/templates/viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div style="margin-left: 500px; margin-top: 10px;">
<b>Select statistics to display: </b>
<select id="mySelect" autofocus>
<option>select</option>
<option disabled selected value>select</option>
<option>Average</option>
<option>Median</option>
<option>SD</option>
Expand Down

0 comments on commit e756565

Please sign in to comment.