I'm trying to build a simple stock chart in R, but for some reason the dates on the X axis are not converted in a proper format:
I've tried all sorts of functions to convert my dates (as.Date, as.POSIXct,...), but nothing seems to help.
This is my code to render the chart:
highchart(type = "stock") %>%
hc_add_series(name = "Price", type = "line", color = "blue", data = df$price) %>%
hc_xAxis(categories = df$timestamp, type = "date")
My input data frame has just 2 columns: timestamp & price.
Can someone please help me out?
Thanks in advance!
Kind regards,
Simon
In the series, add this "tooltip": { "custom": true },
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.