From: Tim Klingeleers Date: Tue, 8 Jul 2014 11:15:23 +0000 (+0200) Subject: Missing draw method in Writing new chart types X-Git-Tag: v1.0.1-beta.3~3^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F431%2Fhead;p=thirdparty%2FChart.js.git Missing draw method in Writing new chart types Added the draw method to "Writing new chart types". If you use the template without the draw method, you get an undefined error because Chart.Type.prototype.render calls this.draw() on line 808 in Chart.Core.js. --- diff --git a/docs/06-Advanced.md b/docs/06-Advanced.md index dd31f03ae..f9d696da2 100644 --- a/docs/06-Advanced.md +++ b/docs/06-Advanced.md @@ -92,6 +92,9 @@ Chart.Type.extend({ initialize: function(data){ this.chart.ctx // The drawing context for this chart this.chart.canvas // the canvas node for this chart + }, + // Used to draw something on the canvas + draw: function() { } });