Upper/lower bar
We can create multiple series in which each series has an upper/lower bar in terms of shade just like the error bar. In the Below graph, the amazon and tesla series example is shown.
R
# import tesla and amazon stock price getSymbols ( "AMZN" ) stocks <- cbind (AMZN[,2:4], TSLA[,2:4]) # plot graph dygraph (stocks, main = "Amazon and Tesla Share Prices" ) %>% dySeries ( c ( "AMZN.Low" , "AMZN.Close" , "AMZN.High" ), label = "AMZN" ) %>% dySeries ( c ( "TSLA.Low" , "TSLA.Close" , "TSLA.High" ), label = "TSLA" ) |
Output:
How to use interactive time series graph using dygraphs in R
Dygraphs refer to as Dynamic graphics which leads to an easy way to create interaction between user and graph. The dygraphs are mainly used for time-series analysis. The dygraphs package is an R interface to the dygraphs JavaScript charting library in R Programming Language.