From cdfdc3c3e28919f55f353d0af61a63ef3b7b984d Mon Sep 17 00:00:00 2001 From: Tim Klingeleers Date: Tue, 8 Jul 2014 13:15:23 +0200 Subject: [PATCH] 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. --- docs/06-Advanced.md | 3 +++ 1 file changed, 3 insertions(+) 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() { } }); -- 2.47.2