rstudio / dygraphs

R interface to dygraphs
http://rstudio.github.io/dygraphs
Other
365 stars 194 forks source link

cssClass has no impact on dyAnnotation #258

Open sanjmeh opened 2 years ago

sanjmeh commented 2 years ago

dygraphs for R is an excellent time series visualisation wrapper around Javascript Dygraphs. here's the issue: I am not seeing any effect of cssClass argument in dyAnnotation() function. I have tried the following:

dygrh %>% dyAnnotation(series = "SERIES 1",x = xpos,text = txt,width = 35,cssClass = "font-size:50px;")

I have also tried a separate css file to call all the styling using the dyCSS() function,

dygrh %>% 
dyAnnotation(series = "SERIES 1",x = xpos,text = txt,width = 35,cssClass = "dyAnnot")  %>%
dyCSS("mystyles.css")

Here's the css file I use.

.dygraph-axis-label-y2{
  color: red;
}

.dygraph-title{
  font-size:30px;
}

.dyAnnot{
  font-size:30px;
}

So while the first two classes are picked up, the user defined class created by me (.dyAnnot) is not getting picked up.