X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=docs%2Fannotations.html;h=d69dd29bdcdb5dd4302eea7faaabe2802b2b6368;hb=e55b4f4f1386ee9ff2588206875fa2d70403fbb1;hp=b0281f62977be97e3941d99c7bebf2ea2ebabd7c;hpb=d731e9648ed50ecd739792a5eb9ac9b2b21158bd;p=dygraphs.git diff --git a/docs/annotations.html b/docs/annotations.html index b0281f6..d69dd29 100644 --- a/docs/annotations.html +++ b/docs/annotations.html @@ -142,6 +142,8 @@
Annotations are JavaScript dictionaries. The series
and x
fields are required: they indicate which point the annotation should be attached to. If specified, shortText
will appear on the annotation "flag". If you don't specify shortText
, you can specify icon
instead to display a small picture. The text
parameter specifies hovertext. If you highlight the annotation and leave the mouse still, it will appear.
If you are using native format, you need to pass in a numeric value for the x
field. For a numeric x-axis, simply pass in the x-value of the data point on which you wish to attach the annotation. For a date axis, pass in Date.parse('YYYY/MM/DD')
. This returns milliseconds since epoch for the date.
To remove or modify existing annotations, call the
annotations
method to get an array of annotations. Modify that