this.computeYAxes_();
// Create a new plotter.
- if (this.plotter_) this.plotter_.clear();
+ if (this.plotter_) {
+ this.cascadeEvents_('clear');
+ this.plotter_.clear();
+ }
this.plotter_ = new DygraphCanvasRenderer(this,
this.hidden_,
this.hidden_ctx_,
* @private
*/
Dygraph.prototype.renderGraph_ = function(is_initial_draw) {
+ this.cascadeEvents_('clear');
this.plotter_.clear();
+
this.plotter_.render();
// TODO(danvk): is this a performance bottleneck when panning?