mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
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:
parent
ef5081184f
commit
cdfdc3c3e2
@ -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() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user