highcharter animations in flexdashboard

Hello!

I've run into an issue when trying to control/edit the animations of highcharts in flexdashboard. It appears that the animation preferences I pass through using plotOptions are ignored.

I have a normal .Rmd that shows the intended animation options and a flexdashboard with the same graph code.

My goal is to just show those highcharts in the flexdashboard with their animation settings, so I'm open to alternatives as well :slight_smile:

Thanks!

When I run this locally this is working for me - the animation is working.
Do you have updated version of all the packages ?

---
title: "ReprexFlex"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
    source: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(highcharter)
penguins <- palmerpenguins::penguins
```

Row
-----------------------------------------------------------------------

### Chart A

```{r}
hchart(penguins, "scatter", hcaes(x = flipper_length_mm, y = bill_length_mm, group = species)) %>%
  hc_plotOptions(series = list(animation = F))
```

Row
-----------------------------------------------------------------------

### Chart B

```{r}
hchart(penguins, "scatter", hcaes(x = flipper_length_mm, y = bill_length_mm, group = species)) %>%
  hc_plotOptions(series = list(animation = list(duration = 20000)))
```

Yup. I had an up-to-date flexdashboard and highcharter, but a sneaky out of date Rmarkdown.

Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.