events = [];
g.updateOptions({series: {Y1: {color: 'blue'}}});
assertEquals([
- "clearChart",
"predraw",
- "clearChart", // why is clearChart called twice?
+ "clearChart",
"willDrawChart",
"didDrawChart"
], events);
assertEquals([
"dataWillUpdate",
"dataDidUpdate",
- "clearChart",
"predraw",
- "clearChart", // why is clearChart called twice?
+ "clearChart",
"willDrawChart",
"didDrawChart"
], events);
// TODO(danvk): move more computations out of drawGraph_ and into here.
this.computeYAxes_();
- // Create a new plotter.
- if (this.plotter_) {
- this.cascadeEvents_('clearChart');
- this.plotter_.clear();
- }
-
if (!this.is_initial_draw_) {
this.canvas_ctx_.restore();
this.hidden_ctx_.restore();
this.canvas_ctx_.save();
this.hidden_ctx_.save();
+ // Create a new plotter.
this.plotter_ = new DygraphCanvasRenderer(this,
this.hidden_,
this.hidden_ctx_,