htmlwidgets

DataLabels in R highcharter cannot be seen after print as png or jpg

家住魔仙堡 提交于 2020-07-25 03:50:33
问题 I'm trying to print my highchartrer chart. library(highcharter) webshot::install_phantomjs() colors_ <- colorize(1:6, c("#FFA500", "#000000")) df <- data.frame(y = round(rnorm(5, 10, 2), digits = 1), name = paste0("Name", c(1:5)), color = colors_[1:5]) hc <- highchart() %>% hc_chart(type = "column") %>% hc_xAxis(categories = df$name) %>% hc_add_series( df, dataLabels = list( enabled = T, shadow = F, color = "black", style = list( textShadow = F, textOutline = F, fontWeight = 'normal', opacity

DataLabels in R highcharter cannot be seen after print as png or jpg

送分小仙女□ 提交于 2020-07-25 03:48:09
问题 I'm trying to print my highchartrer chart. library(highcharter) webshot::install_phantomjs() colors_ <- colorize(1:6, c("#FFA500", "#000000")) df <- data.frame(y = round(rnorm(5, 10, 2), digits = 1), name = paste0("Name", c(1:5)), color = colors_[1:5]) hc <- highchart() %>% hc_chart(type = "column") %>% hc_xAxis(categories = df$name) %>% hc_add_series( df, dataLabels = list( enabled = T, shadow = F, color = "black", style = list( textShadow = F, textOutline = F, fontWeight = 'normal', opacity

Passing fig.width into a taglist

随声附和 提交于 2020-07-07 22:40:21
问题 The rgl widget responds to the figure width and height specified in knitr code chunk options, e.g. ```{r fig.width=2, fig.height=2} library(rgl); example(plot3d); rglwidget() ``` gives a small plot (192 x 192 on my screen). However, if I put rglwidget() in a browsable tagList, it doesn't: ```{r fig.width=2, fig.height=2} library(rgl); example(plot3d) library(htmltools) browsable(tagList(rglwidget(), rglwidget())) ``` This gives two full size widgets. Debugging the Javascript shows that each

Passing fig.width into a taglist

徘徊边缘 提交于 2020-07-07 22:39:36
问题 The rgl widget responds to the figure width and height specified in knitr code chunk options, e.g. ```{r fig.width=2, fig.height=2} library(rgl); example(plot3d); rglwidget() ``` gives a small plot (192 x 192 on my screen). However, if I put rglwidget() in a browsable tagList, it doesn't: ```{r fig.width=2, fig.height=2} library(rgl); example(plot3d) library(htmltools) browsable(tagList(rglwidget(), rglwidget())) ``` This gives two full size widgets. Debugging the Javascript shows that each

Passing fig.width into a taglist

守給你的承諾、 提交于 2020-07-07 22:38:03
问题 The rgl widget responds to the figure width and height specified in knitr code chunk options, e.g. ```{r fig.width=2, fig.height=2} library(rgl); example(plot3d); rglwidget() ``` gives a small plot (192 x 192 on my screen). However, if I put rglwidget() in a browsable tagList, it doesn't: ```{r fig.width=2, fig.height=2} library(rgl); example(plot3d) library(htmltools) browsable(tagList(rglwidget(), rglwidget())) ``` This gives two full size widgets. Debugging the Javascript shows that each

How to subset data in networkD3 on Shiny?

五迷三道 提交于 2020-05-29 09:36:07
问题 Here is a reproducible example: library(networkD3) MyNodes<-data.frame(name= c("A", "B", "C", "D", "E", "F"), size= c("1","1","1","1","1","1"), Team= c("Team1", "Team1", "Team1", "Team1", "Team2", "Team2"), group= c("Group1", "Group1", "Group2", "Group2", "Group1", "Group1")) MyLinks<-data.frame(source= c("0","2","4"), target= c("1","3","5"), value= c("10","50","20")) forceNetwork(Links = MyLinks, Nodes = MyNodes, Source = "source", Target = "target", Value = "value", NodeID = "name",