X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=docs%2Fannotations.html;fp=docs%2Fannotations.html;h=d69dd29bdcdb5dd4302eea7faaabe2802b2b6368;hb=41ee764f8a4eca14b72c66116b6cca0084b82b77;hp=b0281f62977be97e3941d99c7bebf2ea2ebabd7c;hpb=fbff6d71498de79d95df32c4c3005c0139c88788;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.

+

Modifying Annotations

To remove or modify existing annotations, call the annotations method to get an array of annotations. Modify that