Skip to content

Commit

Permalink
adding the hover view
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Johnson committed Aug 22, 2013
1 parent baaff58 commit 5e31ec8
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions grade-distr.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ var gradeDistr = (function() {
bottom = Math.abs(sliderObj.slider("values", 0) - 0);
top = Math.abs(100 - sliderObj.slider("values", 1));
controller.groupPeopleByAvr(quizname, bottom, 100-top);
hoverInfos();
displayBasicInfo(quizname);
drawInitialGraph(quizname, "#column1", bar_outerWidth, bar_outerHeight, bar_margin, 0, false);
}
Expand Down Expand Up @@ -1142,6 +1143,9 @@ var gradeDistr = (function() {

$('#asgn-nav').html(quizname+"<span class='caret'></span>");
if (quizname != "ViewAll") {
if ($('.legendTitle').length > 0) {
$('.legendTitle').remove();
}
displayBasicInfo(quizname);
if (modeBools[0]) {
if ($('.btn-l').attr("disabled")=="disabled") {
Expand Down Expand Up @@ -1184,13 +1188,40 @@ var gradeDistr = (function() {
}
else if (modeBools[1]){
controller.drawAllRankScatterPlots();

}
else if (modeBools[2]){
controller.drawAllAvrScatterPlots();

}

var legendArea = $('#legend');
legendArea.show();

var container = $('#column1');
var items = container.find('.chart');
items.each(function() {
var title = $(this).find('.title');
$(this).attr('id', title.text());

$(this).hover(function() {
legendArea.find('.legendTitle').remove();
legendArea.prepend('<p class="legendTitle">'+title.text()+'</p>');
$('.legendTitle').css({"text-align": "center", "font-size": "20px", "font-weight": "bold"});
displayBasicInfo(title.text());
});
});




}
});
});

function hoverInfos() {

}

$('.btn-l').attr("disabled", true); //initial button state;

Expand Down

0 comments on commit 5e31ec8

Please sign in to comment.