projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Feature Request] Provide option to set color and width for annotation line (#703)
[dygraphs.git]
/
src
/
plugins
/
annotations.js
diff --git
a/src/plugins/annotations.js
b/src/plugins/annotations.js
index
87153c8
..
f6dd68e
100644
(file)
--- a/
src/plugins/annotations.js
+++ b/
src/plugins/annotations.js
@@
-148,7
+148,8
@@
annotations.prototype.didDrawChart = function(e) {
var ctx = e.drawingContext;
ctx.save();
var ctx = e.drawingContext;
ctx.save();
- ctx.strokeStyle = g.colorsMap_[p.name];
+ ctx.strokeStyle = a.hasOwnProperty('tickColor') ? a.tickColor : g.colorsMap_[p.name];
+ ctx.lineWidth = a.hasOwnProperty('tickWidth') ? a.tickWidth : g.getOption('strokeWidth');
ctx.beginPath();
if (!a.attachAtBottom) {
ctx.moveTo(p.canvasx, p.canvasy);
ctx.beginPath();
if (!a.attachAtBottom) {
ctx.moveTo(p.canvasx, p.canvasy);