Skip to content

Instantly share code, notes, and snippets.

@eiennohito
Created September 1, 2012 16:43
Show Gist options
  • Save eiennohito/3579934 to your computer and use it in GitHub Desktop.
Save eiennohito/3579934 to your computer and use it in GitHub Desktop.
(function() {
var datesCallback, process;
process = function(objs) {
var o, _i, _len, _results;
_results = [];
for (_i = 0, _len = objs.length; _i < _len; _i++) {
o = objs[_i];
_results.push([o.idx, o.count]);
}
return _results;
};
datesCallback = function(dates) {
$.jqplot('chart2', [process(dates)], {
title: "Scheduled count for next 10 days",
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barWidth: 25
},
pointLabels: {
show: true
}
}
});
};
$(document).ready(function() {
return $.ajax({
url: "../api/stats/personal/future_reps",
dataType: "json",
success: datesCallback
});
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment