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.
This commit is contained in:
Tim Klingeleers 2014-07-08 13:15:23 +02:00
parent ef5081184f
commit cdfdc3c3e2

View File

@ -92,6 +92,9 @@ Chart.Type.extend({
initialize: function(data){ initialize: function(data){
this.chart.ctx // The drawing context for this chart this.chart.ctx // The drawing context for this chart
this.chart.canvas // the canvas node for this chart this.chart.canvas // the canvas node for this chart
},
// Used to draw something on the canvas
draw: function() {
} }
}); });