Open ochee opened 1 year ago
with hcaes(..., y = sales2)
highcharter renders a dynamic plot with wrong y-axis (as interpreted as a "datimetype" type), see below :
by using a datetime_to_timestamp function first
datasample <- data.frame(month = c("2020-01-01","2020-02-01","2020-03-01"),
sales = datetime_to_timestamp(as.Date(c("2019-05-08","2022-02-10","2024-12-01"))),
sales2 = c(10,12,6))
and hc_tooltip for formatting :
highchart() %>%
hc_add_series(datasample, hcaes(x =month , y = sales),
type = "area", name = "Sales") %>%
#hc_xAxis(type = "datetime", dateTimeLabelFormats = list(day = '%d of %b')) %>%
hc_xAxis(type = "datetime") %>%
hc_yAxis(type = "datetime") %>%
hc_tooltip(crosshairs = TRUE, pointFormat = "y: {point.y:%Y-%m-%d}")
it works !
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to reopen it if you find it necessary.
Hello,
I tried to plot a highcharter line serie with both x and y values as date, see my sample data below :
The render plot is blank, nothing is dipslayed. Is it possible in highcharter package to do this kind of plot ? many thanks, Ochees