我想在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