renderImage尝试从 Internet 渲染图像时不起作用。当图像在本地机器上时它起作用。
output$myImage <- renderImage({
pfad <- "https://www.rstudio.com/wp-content/uploads/2014/03/blue-125.png"
list(src = pfad,
contentType = 'image/png',
width = 400,
height = 300,
alt = "This is alternate text")
}, deleteFile = F)
imageOutput("myImage")
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用rCharts从Highcharts in Shiny制作活动量表.请帮忙.
#server.R
library(shiny)
library(rCharts)
shinyServer(function(input, output) {
output$chart <- renderChart({
a <- Highcharts$new()
a$series(data = 50, type = "solidgauge")
a$addParams(dom = "chart")
return(a)
})
})
#ui.R
library(shiny)
library(rCharts)
shinyUI(bootstrapPage(
chartOutput("chart", "highcharts")
))
Run Code Online (Sandbox Code Playgroud)