//Flot Line Chart $(document).ready(function() { console.log("document ready"); var offset = 0; plot(); function plot() { var sin = [], cos = []; /* for (var i = 0; i < 52; i += 1) { sin.push([i, Math.sin(i + offset)]); cos.push([i, Math.cos(i + offset)]); }*/ var options = { series: { lines: { show: true }, points: { show: true } }, grid: { hoverable: true //IMPORTANT! this is needed for tooltip to work }, yaxis: { min: 0, max: 5 }, tooltip: true, tooltipOpts: { //content: "'%s' de semana %x.1 Cantidad %y.4", content: "Semana %x.1, Cantidad %y.4", shifts: { x: -0, y: 10 } } }; var plotObj = $.plot($("#flot-line-chart"), [{ data: sin, label: "Anio 0" }, { data: cos, label: "Anio 0" }], options); } });