projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first stab at keying DygraphLayout.points on setIdx
[dygraphs.git]
/
plugins
/
annotations.js
diff --git
a/plugins/annotations.js
b/plugins/annotations.js
index
a3a13c3
..
d47f8c7
100644
(file)
--- a/
plugins/annotations.js
+++ b/
plugins/annotations.js
@@
-10,6
+10,13
@@
Dygraph.Plugins.Annotations = (function() {
Current bits of jankiness:
- Uses dygraph.layout_ to get the parsed annotations.
- Uses dygraph.plotter_.area
Current bits of jankiness:
- Uses dygraph.layout_ to get the parsed annotations.
- Uses dygraph.plotter_.area
+
+It would be nice if the plugin didn't require so much special support inside
+the core dygraphs classes, but annotations involve quite a bit of parsing and
+layout.
+
+TODO(danvk): cache DOM elements.
+
*/
var annotations = function() {
*/
var annotations = function() {
@@
-23,7
+30,7
@@
annotations.prototype.toString = function() {
annotations.prototype.activate = function(g) {
return {
clearChart: this.clearChart,
annotations.prototype.activate = function(g) {
return {
clearChart: this.clearChart,
- d
rawChart: this.d
rawChart
+ d
idDrawChart: this.didD
rawChart
};
};
};
};
@@
-40,7
+47,7
@@
annotations.prototype.clearChart = function(e) {
this.detachLabels();
};
this.detachLabels();
};
-annotations.prototype.drawChart = function(e) {
+annotations.prototype.d
idD
rawChart = function(e) {
var g = e.dygraph;
// Early out in the (common) case of zero annotations.
var g = e.dygraph;
// Early out in the (common) case of zero annotations.