I want to know if is possibel to add a scroll bar horizontal in the box text of hover event.
Example:
library(shiny)
library(plotly)
library(ggplot2)
library(shinythemes)
library(dplyr)
library(carenR)
library(DT)
ui <- fluidPage(
theme = shinytheme("cerulean"),
sidebarPanel(
width = 3,
textInput('title',h5('Add a title to plot:'), value = "")
),
mainPanel(
tabsetPanel(
id = 'dataset',
tabPanel("Plot",icon = icon("bar-chart-o"),
br(),
plotlyOutput("plot"),
hr(),
verbatimTextOutput("hover")
),
tabPanel("Data", icon = icon("table"),
br(),
DT::dataTableOutput("datatable")
)
)
)
server <- function(input, output) {
output$plot <- renderPlotly(
generatePlot(distrules, input, output)
)
output$hover <- renderPrint({
event <- event_data("plotly_hover")
if (is.null(event)) "Hover events appear here (unhover to clear) "
else distrules[(event$pointNumber+1),-match("Dist", names(distrules))]
})
}
generatePlot(distrules, input, output){ ... }
generatePlot() is a function here i create my plot.
My hover info is below my plot, but is too large:
And i want to add a scroll horizontal.