jbkunst / highcharter

R wrapper for highcharts
http://jkunst.com/highcharter/
Other
719 stars 148 forks source link

hc_motion plugin's slider is not contained within htmlwidget #152

Open mwillumz opened 8 years ago

mwillumz commented 8 years ago

I'm able to create highcharter widgets and include them in markdown output. However, in a format such as flexboards I notice that the slider is just below the content. In fact, this is true for standard html output as well and the slider often overlaps with the following content.

jbkunst commented 8 years ago

There's some css issues, I'll try to fix this. Have you a reproducible example for test?

Thanks!

mwillumz commented 8 years ago

Sure (though I'm not sure how to best drop the rmarkdown file in here. An *.Rmd file that looks like the following will mask the slider while switching to output: html_document reveals it.

---
title: Example
output:
  flexdashboard::flex_dashboard:
    vertical_layout: scroll
---

### Chart 1

```{r}
library(highcharter); library(dplyr)
highchart() %>% 
  hc_chart(type = "column") %>% 
  hc_yAxis(max = 6, min = 0) %>% 
  hc_add_series(name = "A", data = c(2,3,4), zIndex = -10) %>% 
  hc_add_series(name = "B",
                data = list(
                  list(sequence = c(1,2,3,4)),
                  list(sequence = c(3,2,1,3)),
                  list(sequence = c(2,5,4,3))
                )) %>% 
  hc_add_series(name = "C",
                data = list(
                  list(sequence = c(3,2,1,3)),
                  list(sequence = c(2,5,4,3)),
                  list(sequence = c(1,2,3,4))
                )) %>% 
  hc_motion(enabled = TRUE,
            labels = 2000:2003,
            series = c(1,2))
mwillumz commented 8 years ago

Somewhat counter intuitively it appears that the "play-controls" div should not be nested within the html-widget div but instead follow it. I'm honestly not sure how to make this change in your package (otherwise I happily would).

screenshot 2016-07-28 at 11 05 48 pm

Morais14 commented 3 years ago

Any news on this? Have the same problem here using flexdashboard with rows orientation.

image

ghost commented 3 years ago

Also getting this issue in a shiny dashboard... can't figure out a way to move the motion button. Did you find any way @Morais14 ?

image

Morais14 commented 3 years ago

Also getting this issue in a shiny dashboard... can't figure out a way to move the motion button. Did you find any way @Morais14 ?

image

Unfortunately I didn't find a solution to the problem.