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

Option to remove all data tables in the export menu #785

Open
tnguyenqh opened this issue Nov 24, 2022 · 1 comment
Open

Option to remove all data tables in the export menu #785

tnguyenqh opened this issue Nov 24, 2022 · 1 comment

Comments

@tnguyenqh
Copy link

Highcharter provides users with options to quickly see the underlying data used to plot the chart. I have a shiny app using highcharters, with some simple drop down menus so users can slice and dice the data.

If users select the "View data table" option from the menu, the data table appears. If they change one of the drop down inputs, and then again select "View data table", a second set of data table will appear.

Now if the user select "Hide data table", only one of the tables is removed. I think the option should remove all the tables

library(highcharter)
library(tidyverse)
library(shiny)

ui <- fluidPage(
  
  selectInput("First", label = "First Variable", width = "100%",
              choices = colnames(iris)), 
  selectInput("Second", label = "Second", width = "100%",
              choices = colnames(iris)),
  highchartOutput("hchartcont")
  
)

server = function(input, output) {
  
  output$hchartcont <- renderHighchart({
    df <- iris %>% select(x = input$First, y = input$Second)
    hchart(df, "line", hcaes(x, y)) %>% 
    hc_exporting(enabled = TRUE)
  })
  
}

shinyApp(ui = ui, server = server)
Copy link

stale bot commented Mar 17, 2024

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