Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Annotation x value should be provided as epoch #970

Closed
tomaszs opened this issue Jul 24, 2019 · 1 comment
Closed

Annotation x value should be provided as epoch #970

tomaszs opened this issue Jul 24, 2019 · 1 comment

Comments

@tomaszs
Copy link

tomaszs commented Jul 24, 2019

Data for series can be provided as Date. Although annotation x value is not the case.

Documentation: http://dygraphs.com/annotations.html states:

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.

This part is confusing. See: https://stackoverflow.com/questions/19117043/dygraphs-adding-annotation-to-my-time-series

I'd propsose to change this part to:

If your series has numeric values, provide a numeric value for x field.
Warning: if your series data are date/time based, x value for annotations has to be milliseconds since epoch. Examples: Date.parse('YYY/MM/DD') or dateObject.getTime() or moment().valueOf()

Some keywords in case someone searches for this issue: how to display annotations, annotations are not showing up, dygraphs annotations not showing up, problem, help, how to import annotation plugin for dygraphs

@mirabilos
Copy link
Collaborator

thanks, committed something similar

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants