我想在reveal.js演示文稿中构建一些Highchart(包HighCharter)。 现在我正在修改这个page的spiderweb图表。
这是我的代码:highcharter降价演示文稿
```{r, echo=FALSE, message=FALSE, results = 'asis', comment = NA}
library("highcharter")
library(magrittr)
gg<- highchart() %>%
hc_chart(polar = TRUE, type = "line") %>%
hc_title(text = "Where do you usually buy solar protection products? (%)") %>%
hc_subtitle(text = "Move the mouse pointer on the spiderweb chart to view the data") %>%
hc_xAxis(categories = c('Supermarket',
'Department Store',
'Pharmacy',
'Perfumery',
'Herbalist',
'Internet',
'Shop for Personal Care'
),
tickmarkPlacement = 'on',
lineWidth = 0) %>%
hc_yAxis(gridLineInterpolation = 'polygon',
lineWidth = 0,
min = 0) %>%
hc_series(
list(
name = "Male (%)",
data = c(14.3,
9.1,
35.8,
26.3,
4.9,
4.6,
4.1
),
pointPlacement = 'on', color="#88C425"
),
list(
name = "Female (%)",
data = c(17.0,
7.0,
40.2,
28.8,
18.3,
2.2,
3.6
),
pointPlacement = 'on', color="#A8DBA8"
)
)
gg$show("inline", include_assets = TRUE)
```
嗯,代码工作proprelly正常sintax,但后来我将其包含在RMarkdown sintax结果的错误:
Error in eval(expr, envir, enclos) :
tentativo di applicare una non-funzione
Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval
莫非
别人的帮助?
喜谐音的解决方案!为什么使用gg $ show()代替gg? Highcharter没有展示方法!编辑:我现在看到我无法在r演示文稿中显示图表。我会检查 – jbkunst
Hi @jbkunst,其实我尝试了'gg',也没有创建任何objet ...但这些解决方案在演示文稿中不起作用。感谢您的帮助 – Giorjet
Hi @jbkunst,您有机会看看您是否可以在演示文稿中放置Highchart?如果我们不能这样做会很耻辱,因为他们看起来很好。在此先感谢 – Giorjet