app/assets/javascripts/sufia/flot_stats.js in sufia-7.0.0.rc1 vs app/assets/javascripts/sufia/flot_stats.js in sufia-7.0.0.rc2
- old
+ new
@@ -1,7 +1,7 @@
$(function() {
- if (typeof stats === "undefined") {
+ if (typeof sufia_item_stats === "undefined") {
return;
}
function weekendAreas(axes) {
var markings = [],
@@ -53,11 +53,11 @@
clickable: true,
markings: weekendAreas
}
};
- var plot = $.plot("#usage-stats", stats, options);
+ var plot = $.plot("#usage-stats", sufia_item_stats, options);
$("<div id='tooltip'></div>").css({
position: "absolute",
display: "none",
border: "1px solid #bce8f1",
@@ -77,11 +77,11 @@
} else {
$("#tooltip").fadeOut(100)
}
});
- var overview = $.plot("#overview", stats, {
+ var overview = $.plot("#overview", sufia_item_stats, {
series: {
lines: {
show: true,
lineWidth: 1
},
@@ -104,10 +104,10 @@
show: false
}
});
$("#usage-stats").bind("plotselected", function(event, ranges) {
- plot = $.plot("#usage-stats", stats, $.extend(true, {}, options, {
+ plot = $.plot("#usage-stats", sufia_item_stats, $.extend(true, {}, options, {
xaxis: {
min: ranges.xaxis.from,
max: ranges.xaxis.to
}
}));