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

streamgraphs and rCharts #14

Open
daniel319 opened this issue Oct 6, 2015 · 1 comment
Open

streamgraphs and rCharts #14

daniel319 opened this issue Oct 6, 2015 · 1 comment
Assignees
Labels

Comments

@daniel319
Copy link

First I want to congratulate you on the excellent package. Second I have a problem of an apparently interaction with rCharts package. In a shiny streamgraphs does not show the x axis values. I hope it is clear by the following example.

library(shiny)
library(dplyr)
library(rCharts)
library(babynames)
library(streamgraph)

server <- function(input, output) {
  output$chartDepo <- renderChart2({
    hair_eye = as.data.frame(HairEyeColor)
  p2 <- nPlot(Freq ~ Hair, group = 'Eye',
              data = subset(hair_eye, Sex == "Female"),
              type = 'multiBarChart'
  )
  p2$chart(color = c('brown', 'blue', '#594c26', 'green'))
  return(p2)
})

  stgr1 <- babynames %>%
    filter(grepl("^Kr", name)) %>%
    group_by(year, name) %>%
    tally(wt=n) %>%
    streamgraph("name", "n", "year")
  output$stgr1 <- renderStreamgraph(stgr1)
}

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      ),
    mainPanel(              showOutput("chartDepo", "nvd3"),
      streamgraphOutput('stgr1')

              )
  )
)

shinyApp(ui = ui, server = server)

Regards,

Daniel Merino

@hrbrmstr
Copy link
Owner

hrbrmstr commented Oct 6, 2015

thx Daniel, I'll take a look.

@hrbrmstr hrbrmstr self-assigned this Oct 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants