I'm not an expert with popups, but in principle, a popup is triggered when a logical condition is satisfied.

In your particular case, I would propose that the easiest approach to identifying any intersections in the line charts would be if `Ma_Value < Mi_Value`

is `TRUE`

for some pairs and `FALSE`

for others. If all values or `FALSE`

or if all values are `TRUE`

, then the lines never intersect.

```
nrow <- 10
set.seed(1) # Use for an example on intersecting lines
# set.seed(718) # Use for an example on non-intersecting lines
df <-
data.frame(row = seq_len(nrow),
Ma_Value = sample(1:100, nrow, replace = TRUE),
Mi_Value = sample(1:100, nrow, replace = TRUE))
# If TRUE, the lines intersect
length(unique(df$Ma_Value < df$Mi_Value)) > 1
# plot
library(ggplot2)
library(tidyr)
df %>%
gather(variable, value,
-row) %>%
ggplot(mapping = aes(x = row,
y = value,
colour = variable)) +
geom_point() +
geom_line()
```