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

c3 height issue #14

Open
thomasthomasth opened this issue Oct 11, 2018 · 2 comments
Open

c3 height issue #14

thomasthomasth opened this issue Oct 11, 2018 · 2 comments

Comments

@thomasthomasth
Copy link

thomasthomasth commented Oct 11, 2018

Hi,

When some c3 visualisation is inserted into a shiny page, the height parameter does not seem to work.

I am not sure if its related to this issue but it is slightly difficult to use it right now in large Shiny Applications.

Here is a working minimal example:

library(shiny)
library(shinydashboard)

data <- data.frame(a = c(1,2,3,2), b = c(2,3,1,5))

shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
tags$head(tags$style("#plot1{height:100vh !important;}")),
tags$head(tags$style("#plot2{height:100vh !important;}")),
fluidRow(
column(6,c3Output("plot1", "100%", "100%")),
column(6,plotOutput("plot2", "100%", "100%"))

)

        )

),
server = function(input, output) {

output$plot1 <- renderC3({
data %>%
  c3()
})

output$plot2 <- renderPlot({
  plot(data)
})

}
)

@thomasthomasth thomasthomasth changed the title c3 resizing issue c3 height issue Oct 11, 2018
@mrjoh3
Copy link
Owner

mrjoh3 commented Oct 11, 2018

I think you are right on the related issue. The resize interaction between the js library shiny and htmlwidgets had been difficult.

The issue you returned had a couple of work arounds, I will try and implement them and get back to you

@thomasthomasth
Copy link
Author

Thanks in advance!

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

2 participants