Skip to content

Commit

Permalink
the chart script file return canvas object
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Suarez committed Dec 7, 2010
1 parent f51d58e commit dde492c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 0 additions & 8 deletions examples/express/public/js/draw/linealChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@

ctx.restore();

$(element).append(canvas);

return canvas;
};

Expand All @@ -85,12 +83,6 @@
}
}
};

// jQuery
$ = jQuery = function(el){
if (global == this) return new jQuery(el);
else this.append = function(){};
};
}

})(typeof module != 'undefined' ? module : {}, typeof module != 'undefined' ? true : false);
5 changes: 4 additions & 1 deletion public/js/drawback.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@

process: function (objDraw) {
// execute function
objDraw.fn(objDraw.data, objDraw.el);
var canvas = objDraw.fn(objDraw.data, objDraw.el);

// insert canvas response into element
$(objDraw.el).append(canvas);
}
}
// *** END DrawBack ***
Expand Down

0 comments on commit dde492c

Please sign in to comment.