Type definition error: Type Date is not assignable to type `Annotations.x`
Hi,
I'm getting typescript error when trying to set Date object for Annotations.x in axis type is date chart.
Note that if you ignore this error and run the program, the position of the X in the annotation will be as expected.
Environments
-
"plotly.js":"2.28.0" -
"@types/plotly.js":"2.12.32"
Declared here
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/index.d.ts#L2006-L2014
Document
https://plotly.com/javascript/reference/layout/annotations/#layout-annotations-items-annotation-x
x Parent: layout.annotations[] Type: number or categorical coordinate string Sets the annotation's x position. If the axis
typeis "log", then you must take the log of your desired range. If the axistypeis "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axistypeis "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.
SS
Thank you for the support!