date <- c(
"2017-01-01",
"2017-01-02",
"2017-01-03",
"2017-01-04",
"2017-03-05",
"2017-01-06",
"2017-01-07"
)
stock <- data.frame(
date = date,
opening = c(200.60, 200.22, 198.43, 199.05, 203.54, 203.40, 208.34),
closing = c(200.72, 198.85, 199.05, 203.73, 204.08, 208.11, 211.88),
low = c(197.82, 198.07, 197.90, 198.10, 202.00, 201.50, 207.60),
high = c(203.32, 200.67, 200.00, 203.95, 204.90, 208.44, 213.17)
)
stock |>
e_charts(date) |>
e_candle(opening, closing, low, high) |>
e_y_axis(min = 190, max = 220)
Run the code above in your browser using DataLab