Increasing the Thickness of a Horizontal Line and Bringing the Horizontal Line to the Front When Using the 'dygraphs::dyLimit()' Function in R?

69 views Asked by At

I have the following data and the following plot.

library (dygraphs)
library (xts)
Time <- seq.POSIXt(as.POSIXct('2023-1-2 14:00:00'), as.POSIXct('2023-1-4 14:00:00'), by = '15 min')
Response <- sin(as.integer(Time) / 1000000) + rnorm(length(Time), 0, 0.01)
Data <- xts::xts(x = Response, order.by = Time)
dygraphs::dygraph(Data) %>%
  dygraphs::dyOptions(drawPoints = T, strokeWidth = 0, pointSize = 2.5) %>%
  dygraphs::dyLimit(mean(Response))

I want to increase the thickness of the horizontal line because it's tough to see it as it is. I'd also like to bring the line to the front because on larger graphs with more points, the horizontal line will be hidden behind the points. I didn't see relevant arguments in the 'dygraphs::dyLimit()' function. How can I do these two things?

0

There are 0 answers