Series color graph

Dygraph can assign different color palettes to each visualization line. For example, our four-parameter in TSLA data (open, high, low, close) can be represented as different colors. Dygraph provides dyOptions() in which colors parameter can be useful to identify each stock line smoothly.

R




# RColorBrewer used to create nice color palettes 
# display.brewer.pal(n, name)
dygraph(price, main = "TSLA Stock price analysis") %>% 
    dyOptions(colors = RColorBrewer::brewer.pal(4, "Dark2"))


Output:

Visualising 4 parameter of stock price

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

Similar Reads

Creating simple dygraphs

Let’s take stock data for a better understanding of time series....

Series color graph

...

Vertical and Horizontal shading

Dygraph can assign different color palettes to each visualization line. For example, our four-parameter in TSLA data (open, high, low, close) can be represented as different colors. Dygraph provides dyOptions() in which colors parameter can be useful to identify each stock line smoothly....

Candlestick graph

...

Upper/lower bar

Vertical shading:...

Range Selector

...

Contact Us