【发布时间】:2015-12-13 14:38:03
【问题描述】:
我想将一个 nplot 嵌入到闪亮的 server.R 中
shinyServer(function(input, output) {
output$testChart <- renderChart2({
n1<-nPlot(Freq ~ Var1, data=speedTable, type="discreteBarChart", color="blue")
n1$xAxis(axisLabel = "Heading")
n1$yAxis(axisLabel = "label", width = 40)
n1$set(title = "Title")
n1$addParams(dom = 'testChart')
return(n1)
})
})
我的 index.html 是这样的:
<html>
<head>
<script src="shared/jquery.js" type="text/javascript"></script>
<script src="shared/shiny.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="shared/shiny.css"/>
</head>
<body>
<br />
<br />
<hr />
<div class="rChart nvd3" id="testChart"></div>
</body>
</html>
但在页面中没有显示任何内容? 非常感谢您的帮助
【问题讨论】: