Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rHighcharts with events not working correctly #6

Open
cls3415 opened this issue May 4, 2015 · 0 comments
Open

rHighcharts with events not working correctly #6

cls3415 opened this issue May 4, 2015 · 0 comments

Comments

@cls3415
Copy link

cls3415 commented May 4, 2015

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'
))))
)

@cls3415 cls3415 changed the title highcharts cannot be shown in shinydashboard or shiny rHighcharts with events not working correctly May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant