When working with pagedown in rmarkdown I can not get a highcharter plot working. Below a minor script. Any one a clue what I'm doing wrong?
---
title: "Example highcharter"
author: "Roelof"
output:
pagedown::html_letter:
self_contained: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(highcharter)
```
# Figure Highcharter
```{r fig, out.width="80%"}
highchart() |>
hc_chart(type = "bar") |>
hc_add_series(mtcars, mapping = hcaes(y=mpg), type = "bar") |>
hc_xAxis(categories = rownames(mtcars))
```
highchartergenerates ahtmlwidgetthat is included in the html.It seems that htmlwidgets are not supported by
pagedownat the moment: https://github.com/rstudio/pagedown/issues/58So not doing anything wrong :-)