You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use rHighcharts with events in Shinydashboard, but I couldn't get things right. It will show the "pointer", but not the alert window. Can anyone help?
I've been trying to use rHighcharts with events in Shinydashboard, but I couldn't get things right. It will show the "pointer", but not the alert window. Can anyone help?
Thanks!!
server.R
require(rHighcharts)
server <- shinyServer(function(input, output) {
output$myChart2 <- renderChart({
h1 <- rHighcharts:::Chart$new()
h1$chart(type = "column", polar = FALSE)
h1$plotOptions(
series = list(
cursor = 'pointer',
point = list(
events = list(
click = "function () {alert('value: ' + this.y);}"
)
)
)
)
h1$data(c(1, 3, 2, 4, 5, 4, 6, 2, 3, 5, NA), dashStyle = "longdash")
h1$data(c(NA, 4, 1, 3, 4, 2, 9, 1, 2, 3, 4), dashStyle = "shortdot")
h1$legend(symbolWidth = 80)
return(h1)
})
})
ui.R
require(googleVis)
shinyUI(pageWithSidebar(
headerPanel("", windowTitle="Example googleVis with interaction"),
sidebarPanel(
tags$head(tags$style(type='text/css', "#selected{ display: none; }")),
selectInput("dataset", "Choose a dataset:",
choices = c("pressure", "cars")),
uiOutput("selectedOut")
),
mainPanel(
tabsetPanel(
tabPanel("Main",
htmlOutput("view"),
plotOutput("distPlot", width="300px", height="200px")),
tabPanel("About", 'http://www.google.com'
))))
)
The text was updated successfully, but these errors were encountered: