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

Charts with highchartOutput2 not rendering #800

Open
msaltieri opened this issue Jun 30, 2023 · 1 comment
Open

Charts with highchartOutput2 not rendering #800

msaltieri opened this issue Jun 30, 2023 · 1 comment

Comments

@msaltieri
Copy link

Hey @jbkunst, I appreciate your work on highcharter! I've encountered an issue with highchartOutput2 in Shiny where the charts aren't rendering. Please find below more details and a reproducible example. Would appreciate your help on this. Thanks!

Description

When using the highchartOutput2 function from the highcharter package in a Shiny application, the charts are not rendering properly. The issue can be reproduced with the provided example code.

Steps to Reproduce

  1. Run the code provided in a Shiny application.
  2. Open the application in a web browser.

Expected Behavior

The application should display a chart generated using highchartOutput2 with a line series.

Actual Behavior

The chart does not render properly and is not visible in the application.

Reproducible Example

library(shiny)
library(highcharter)

ui <- fluidPage(
  
  # Application title
  titlePanel("Testing Highchart 2"),
  
  fluidRow(
    column(
      width = 6,
      highchartOutput2("chart")
    )
  )
  
)

server <- function(input, output) {
  
  output$chart <- renderHighchart2(
    highchart2() |>
      hc_add_series(
        data = cumsum(rnorm(100)),
        step = "left"
      ) |>
      hc_plotOptions(
        line = list(
          marker = list(
            enabled = FALSE
          )
        )
      ) |>
      hc_tooltip(
        enabled = FALSE
      ) |>
      hc_legend(
        enabled = FALSE
      )
  )
  
}

# Run the application
shinyApp(ui = ui, server = server)

Environment

  • Platform: x86_64-apple-darwin20 (64-bit)
  • Running under: macOS Ventura 13.4
  • R version 4.3.0 (2023-04-21)
  • Shiny version: 1.7.4
  • highcharter version: 0.9.4

Additional Information

I have explored various configurations, and it seems that the only workaround to make the chart appear is by substituting highchartOutput2 with highchartOutput. This approach loads all the modules in the browser, which I initially wanted to avoid for performance reasons. Nevertheless, it would be helpful to have highchartOutput2 function properly render the chart while maintaining performance optimization. Thank you for your attention to this matter.

Copy link

stale bot commented Feb 25, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to reopen it if you find it necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant