The data I am trying to plot is of the form :
[
[24894174208.0, 1604842800],
[24903880704.0, 1604843100]
]
where x = data points; y = UNIX_EPOC_Time
while plotting I am interchanging x,y; so as to plot UNIX_EPOC_Time
on X-axis
& data points on Y-axis
I have to multiply UNIX_EPOC_Time
by 1000
as: Javascript uses milliseconds internally, while normal UNIX
timestamps are usually in seconds. ( Why do I need to multiply unix timestamps by 1000 in JavaScript? )
Also I am trying to find anomalies in the dataPoints which is being plotted with a dot (yellow/orange/red).
However, in the function
js[isIn(anomoly, point){...}]
where I find anomalies in dataPoints, I see the datapoints take the form as:
[1604923500000, 22179459072000]
instead of:
[1604923500, 22179459072.0]
due to which I have to divide the data point (here: 22179459072000
) by 1000
to bring it to it's original form 22179459072.0
in order to plot it on the graph.
I am not sure why this is happening though.
I have reproduced the issue in stackblitz.