jbkunst / highcharter

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

playIcon button missing #499

Closed aniruhil closed 1 year ago

aniruhil commented 5 years ago

The playIcon button does not show up, neither in the RStudio viewer nor if I knit to html (with/without framewidget). I must have failed to activate some option?

I did try loading fontawesome and then specifying playIcon = fa_icon("play")

sample code and output + sessionInfo are shown below.

library(highcharter)
library(jsonlite)
library(tidyverse)
URL <- "http://graphics8.nytimes.com/newsgraphics/2016/01/15/drug-deaths/c23ba79c9c9599a103a8d60e2329be1a9b7d6994/data.json"

data("uscountygeojson")
data("unemployment")

data <-  fromJSON(URL) %>% 
  tbl_df() %>% 
  gather(year, value, -fips) %>% 
  mutate(year = sub("^y", "", year),
         value = ifelse(is.na(value), 0, value))

head(data)
#> # A tibble: 6 x 3
#>   fips  year  value
#>   <chr> <chr> <dbl>
#> 1 01001 2002      1
#> 2 01003 2002      2
#> 3 01005 2002      0
#> 4 01007 2002      1
#> 5 01009 2002      2
#> 6 01011 2002      0

ds <- data %>% 
  group_by(fips) %>% 
  do(item = list(
    fips = first(.$fips),
    sequence = .$value,
    value = first(.$value))) %>% 
  .$item

highchart(type = "map") %>% 
  hc_add_series(data = ds,
                name = "drug deaths per 100,000",
                mapData = uscountygeojson,
                joinBy = "fips",
                borderWidth = 0.01) %>% 
  hc_colorAxis(stops = color_stops()) %>%  
  hc_title(text = "How the Epidemic of Drug Overdose Deaths Ripples") %>% 
  hc_legend(layout = "vertical", reversed = TRUE,
            floating = TRUE, align = "right") %>% 
  hc_add_theme(hc_theme_smpl()) %>% 
  hc_motion(
    enabled = TRUE,
    axisLabel = "year",
    labels = sort(unique(data$year)),
    series = 0,
    updateIterval = 50,
    magnet = list(
      round = "floor",
      step = 0.1
    )
  )

and the resulting figure is here:

image

sessionInfo()

> R version 3.5.2 (2018-12-20)

> Platform: x86_64-apple-darwin15.6.0 (64-bit)

> Running under: macOS Sierra 10.12.6

>

> Matrix products: default

> BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib

> LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

>

> locale:

> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

>

> attached base packages:

> [1] stats graphics grDevices utils datasets methods base

>

> loaded via a namespace (and not attached):

> [1] compiler_3.5.2 magrittr_1.5 tools_3.5.2 htmltools_0.3.6

> [5] yaml_2.2.0 Rcpp_1.0.0 stringi_1.2.4 rmarkdown_1.11

> [9] highr_0.7 knitr_1.21 stringr_1.3.1 xfun_0.4

> [13] digest_0.6.18 evaluate_0.12

stale[bot] commented 4 years ago

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.

wergeld commented 4 years ago

This issue is still present under 0.8.2.

MERE55 commented 3 years ago

@jbkunst ... same for me : play and pause button is displayed and working but without the fontawesome icons on it as in the screenshot of @aniruhil

MERE55 commented 3 years ago

Are there any news available for this issue ?

ghost commented 3 years ago

Also getting this issue, did you ever come up with a workaround or method to change the location of the motion button? @MERE55 @wergeld @aniruhil

image

aniruhil commented 3 years ago

None so far that I have seen, @adamivisonnhs

MERE55 commented 3 years ago

... unfortunately no change or workaround so far ...

Am 14.07.2021 16:41 schrieb adamivisonnhs:

Also getting this issue, did you ever come up with a workaround or method to change the location of the motion button? @MERE55 [1] @wergeld [2] @aniruhil [3]

[4]

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [5], or unsubscribe [6].

Links:

[1] https://github.com/MERE55 [2] https://github.com/wergeld [3] https://github.com/aniruhil [4] https://user-images.githubusercontent.com/66741381/125641514-ba4b3a3d-ad27-404e-a2e7-229320e9f579.png [5] https://github.com/jbkunst/highcharter/issues/499#issuecomment-879952160 [6] https://github.com/notifications/unsubscribe-auth/AO3U4T5WJOGQY65FZBUSWP3TXWOZPANCNFSM4GTDAT7Q

ghost commented 3 years ago

@jbkunst do you think there will be a fix for this anytime soon?... linked to this issue perhaps https://github.com/TorsteinHonsi/Motion-Highcharts-Plugin/issues/23 ?

fontawesome 4 -> 5 renamed "fa fa-play" -> "fas fa-play" and "fa fa-pause" -> "fas fa-pause"

I have also come across github repos with the same issue

https://github.com/houstonhaynes/PortfolioSite/blob/efbe8a9fe777d125fb9627c6514ad110cc8674a7/content/post/COVID-19-in-Motion-pt1.Rmd

admivsn commented 2 years ago

@MERE55 @aniruhil @wergeld

Could you try adding this dependency at the top of your ui function (inside tagList) in shiny:

fontawesome::fa_html_dependency()

It fixed the issue for me

aniruhil commented 2 years ago

@admivsn Glad it worked! Unfortunately no such luck on one machine. Will see if this works on the other machine next week. Perplexing.

aniruhil commented 2 years ago

No luck on an M1 Mini either. sessionInfo() details follow.

``` > sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.6.1 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] idbr_1.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.8 [5] purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.6 [9] ggplot2_3.3.5 tidyverse_1.3.1 jsonlite_1.7.3 highcharter_0.9.4 loaded via a namespace (and not attached): [1] httr_1.4.2 modelr_0.1.8 assertthat_0.2.1 [4] TTR_0.24.3 countrycode_1.3.1 highr_0.9 [7] sp_1.4-6 cellranger_1.1.0 yaml_2.2.2 [10] pillar_1.7.0 backports_1.4.1 lattice_0.20-45 [13] glue_1.6.1 rlist_0.4.6.2 digest_0.6.29 [16] rvest_1.0.2 colorspace_2.0-2 htmltools_0.5.2 [19] pkgconfig_2.0.3 broom_0.7.12 haven_2.4.3 [22] scales_1.1.1 fontawesome_0.2.2 tzdb_0.2.0 [25] proxy_0.4-26 generics_0.1.2 ellipsis_0.3.2 [28] withr_2.4.3 cli_3.1.1 quantmod_0.4.18 [31] magrittr_2.0.2 crayon_1.4.2 readxl_1.3.1 [34] evaluate_0.14 fs_1.5.2 fansi_1.0.2 [37] xts_0.12.1 xml2_1.3.3 class_7.3-20 [40] tools_4.1.2 data.table_1.14.2 hms_1.1.1 [43] lifecycle_1.0.1 munsell_0.5.0 reprex_2.0.1 [46] compiler_4.1.2 e1071_1.7-9 rlang_1.0.1 [49] classInt_0.4-3 units_0.8-0 grid_4.1.2 [52] rstudioapi_0.13 htmlwidgets_1.5.4 igraph_1.2.11 [55] rmarkdown_2.11 gtable_0.3.0 DBI_1.1.2 [58] curl_4.3.2 R6_2.5.1 zoo_1.8-9 [61] lubridate_1.8.0 knitr_1.37 fastmap_1.1.0 [64] utf8_1.2.2 KernSmooth_2.23-20 stringi_1.7.6 [67] Rcpp_1.0.8 vctrs_0.3.8 sf_1.0-6 [70] xfun_0.29 dbplyr_2.1.1 tidyselect_1.1.1 [73] rnaturalearthdata_0.1.0 ```
stale[bot] commented 1 year ago

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.