Description Usage Arguments Value Note Examples
Specify that a region of a dygraph be drawn with a background shading
1 |
dygraph |
Dygraph to add shading to |
from |
Date/time or numeric to shade from (for date/time this must be a
|
to |
Date/time or numeric to shade to (for date/time this must be a
|
color |
Color of shading. This can be of the form "#AABBCC" or "rgb(255,100,200)" or "yellow". Defaults to a very light gray. |
axis |
Axis to apply shading. Choices are "x" or "y". |
A dygraph with the specified shading
See the online documentation for additional details and examples.
1 2 3 4 5 6 7 8 9 10 | library(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures") %>%
dyShading(from = "1920-1-1", to = "1930-1-1") %>%
dyShading(from = "1940-1-1", to = "1950-1-1")
dygraph(nhtemp, main = "New Haven Temperatures") %>%
dyShading(from = "48", to = "52", axis = "y") %>%
dyShading(from = "50", to = "50.1", axis = "y", color = "black")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.