所以基本上我试图要么使用 googleViz 包和/或只是在 tabPaenl 中嵌入已发布的谷歌图表作为 iframe,然后让它自动调整以适应嵌入在 R Shiny Web 应用程序中相应 tabPanel 中的 tabPanel。任何想法和/或建议都会很棒。
所以我尝试只使用 googleVis 包,它会阻止 r-shiny 应用程序加载,因为 googleVis 想要在单独的网页中打开图表。
基本上我有一个fluidRow,它必须是tabBoxes
fluidRow(
tabBox(
title = "Visualization Trends",
# The id lets us use input$tabset1 on the server to find the current tab
id = "tabset1", height = "500px",
tabPanel("First Response",
"First Tab Content 1",
I WANT TO EMBED THE CHART HERE
),
tabPanel("Case Closure", "First Tab Content 2"),
tabPanel("SLA Met", "First Tab Content 3"),
tabPanel("SLA Missed", "Insert SLA Misses Content"),
tabPanel("Overall CR & MW", "Insert Google Chart")
实际结果没有用,我有点卡住了,所以我真的只需要一些指导而不是其他任何东西。
所以,这并不像我想象的那么难。为了嵌入图表,您必须先发布它,然后选择嵌入选项。然后你复制所有的内容
<iframe>some_embedded_content<iframe>
复制此内容后,您可以将其嵌入到 tabBox 面板中,如下所示:
fluidRow(
tabBox(
title = "Visualization Trends",
# The id lets us use input$tabset1 on the server to find the current tab
id = "tabset1", height = "500px",
tabPanel("First Response",
HTML('<iframe width="600" height="371" seamless frameborder="0" scrolling="no" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRNxLt1gp1TRc7sB83xjGpXLcLLUq8xH0B9iv1/pubchart?oid=1201606802&format=interactive"></iframe>')
)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句