Widget:WJG Sandbox Merge: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1,138: | Line 1,138: | ||
$(".navPaneButton").unbind('click'); | $(".navPaneButton").unbind('click'); | ||
$(".navPaneButton").click(window.exam, questionReviewNavigation); | $(".navPaneButton").click(window.exam, questionReviewNavigation); | ||
point_labels=[]; | |||
for (var j = 0; j < qdist.length; j+=1){ | |||
point_labels=[]; | point_labels[j]=j.toString(); | ||
for (var j = 0; j < qdist.length; j+=1){ | |||
} | } | ||
var | var simExamData = { | ||
labels : point_labels, | |||
datasets : [ | |||
{ | |||
fillColor : "rgba(220,220,220,0.5)", | |||
strokeColor : "rgba(220,220,220,1)", | |||
pointColor : "rgba(220,220,220,1)", | |||
pointStrokeColor : "#fff", | |||
data : qdist, | |||
title: "Percent of test takers" | |||
} | |||
] | |||
} | |||
var newopts = { | |||
yAxisLabel : "Percent of test takers", | |||
yAxisFontFamily : "'Arial'", | |||
yAxisFontSize : 16, | |||
yAxisFontStyle : "normal", | |||
yAxisFontColor : "#666", | |||
xAxisLabel : "Number of correct answers", | |||
legend : false, | |||
legendFontFamily : "'Arial'", | |||
legendFontSize : 12, | |||
legendFontStyle : "normal", | |||
legendFontColor : "#666", | |||
legendBlockSize : 15, | |||
legendBorders : false, | |||
legendBordersColor : "#666", | |||
graphTitle : "Peer Performance", | |||
graphTitleFontFamily : "'Arial'", | |||
graphTitleFontSize : 24, | |||
graphTitleFontStyle : "bold", | |||
graphTitleFontColor : "#666", | |||
} | |||
// get line chart canvas | |||
var simExams = document.getElementById('simExams').getContext('2d'); | |||
// draw line chart | |||
new Chart(simExams).Line(simExamData,newopts); | |||
} | } | ||