From: Dan Vanderkam Date: Fri, 6 Jul 2012 03:58:30 +0000 (-0700) Subject: running into some issues with ordering X-Git-Tag: v1.0.0~240 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=189f80303921bdd511720934763b5bbc14914756;p=dygraphs.git running into some issues with ordering --- diff --git a/dygraph.js b/dygraph.js index aea8830..4f6b41b 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1128,7 +1128,7 @@ Dygraph.prototype.getPropertiesForSeries = function(series_name) { name: series_name, column: idx, visible: this.visibility()[idx - 1], - color: this.plotter_.colors[series_name], + color: this.colorsMap_[series_name], axis: 1 + this.seriesToAxisMap_[series_name] }; }; @@ -2341,6 +2341,10 @@ Dygraph.prototype.renderGraph_ = function(is_initial_draw) { this.cascadeEvents_('clearChart'); this.plotter_.clear(); + this.cascadeEvents_('drawChart', { + canvas: this.hidden_, + drawingContext: this.hidden_ctx_, + }); this.plotter_.render(); // TODO(danvk): is this a performance bottleneck when panning? @@ -2353,11 +2357,6 @@ Dygraph.prototype.renderGraph_ = function(is_initial_draw) { if (this.rangeSelector_) { this.rangeSelector_.renderInteractiveLayer(); } - - this.cascadeEvents_('drawChart', { - canvas: this.hidden_, - drawingContext: this.hidden_ctx_, - }); if (this.attr_("drawCallback") !== null) { this.attr_("drawCallback")(this, is_initial_draw); } diff --git a/plugins/README b/plugins/README index 7956d55..f216545 100644 --- a/plugins/README +++ b/plugins/README @@ -99,8 +99,15 @@ Plugin Events Reference: - select - deselect +TODO(danvk): document all event properties for each event. + + Special methods: - (constructor) - activate - destroy + +---------------- + +Notes on plugin registration and event cascade ordering/behavior. diff --git a/tests/demo.html b/tests/demo.html index 6435ca1..94582dc 100644 --- a/tests/demo.html +++ b/tests/demo.html @@ -48,7 +48,8 @@ xlabel: 'Date', ylabel: 'Count', axisLineColor: 'white', - drawXGrid: false + gridLineWidth: 10 + // drawXGrid: false } );