how to pass more than one values while using annotation in dygraph

Hi all,

Below is my data frame sample where second data set is subset of first one and should be marked as anomaly.
First Data set:

> head(X_test_pred)
     V7 Predictions                time
1 26.79           8 2019-02-17 13:04:21
2 26.79          28 2019-02-17 13:04:13
3 26.79          21 2019-02-17 13:04:22
4 26.79          83 2019-02-17 13:04:23
5 26.79          24 2019-02-17 13:04:24
6 26.79           5 2019-02-17 13:04:25

Second Data Set:

> head(anomalyDataframe)
         V7 Predictions                time
92407 26.82           0 2019-02-18 14:44:27
92408 26.82           0 2019-02-18 14:44:28
92409 26.82           0 2019-02-18 14:44:29
92410 26.82           0 2019-02-18 14:44:30
92411 26.82           0 2019-02-18 14:44:31
92412 26.82           0 2019-02-18 14:44:32

I am using for loop for annotation which is making it very slow: below is my annotatio for loop:

for (i in 1:NROW(anomalyDataframe)) {
                        
  dy_graph <- dygraphs::dyAnnotation(dy_graph, x=anomalyDataframe$time[i], text="*")
                         
}

Please suggest a faster way to mark annotations.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.