library(readxl)
library(ggplot2)
library(scales)
data <- read_xlsx("C:\\Users\\LIFEBOOK\\Documents\\Data Visdat.xlsx")
data
## # A tibble: 1,220 × 3
##    Date                  BNI Mandiri
##    <dttm>              <dbl>   <dbl>
##  1 2019-04-29 00:00:00 4812.   3888.
##  2 2019-04-30 00:00:00 4800    3862.
##  3 2019-05-01 00:00:00 4800    3862.
##  4 2019-05-02 00:00:00 4712.   3850 
##  5 2019-05-03 00:00:00 4625    3825 
##  6 2019-05-06 00:00:00 4438.   3762.
##  7 2019-05-07 00:00:00 4475    3825 
##  8 2019-05-08 00:00:00 4375    3762.
##  9 2019-05-09 00:00:00 4288.   3750 
## 10 2019-05-10 00:00:00 4300    3738.
## # ℹ 1,210 more rows
ggplot(data, aes(x = Date)) +
  geom_line(aes(y = BNI, color = "BNI"), size = 1) +
  geom_line(aes(y = Mandiri, color = "Mandiri"), size = 1) +
  labs(x = "Tahun", y = "Penutupan Saham (USD)", color = "Bank") +
  scale_y_continuous(labels = scales::comma) +  
  scale_color_manual(values = c("BNI" = "yellow", "Mandiri" = "green")) +   
  theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.