r - How to reduce the font size of a tooltip in rnvd3? -


i using rnvd3 packadge plot interactive multibarchart in shiny app, , tooltip of chart has big font size , reduce it.

here code:

library(shiny) library(rcharts) library(shinythemes) library(shinydashboard)  ui <- navbarpage(title = "information",                tabpanel(title = "graph",                                   fluidrow(                                  column(2),                                  column(8,                                         tags$br(),                                         tags$h5("chart", style="font-weight: bold; font-size:20px", align = "center"),                                         tags$br())                                ),                                fluidrow(                                 column(1),                                 column(8,                                        tags$br(),                                        tags$h5("exemple", style="font-weight: bold; font-size:14px", align = "center"),                                        tags$br(),                                        showoutput("bar","nvd3")),                                  column(1)                               )                ) )  server <- function(input,output, session) {   output$bar <- renderchart2({    database2 <- cbind(cbind(c(100,110,140),c("2016-09-05","2016-09-05","2016-09-05")),c("product a","product b","product c"))   database2[,1] <- as.numeric(database2[,1])    database2[,2] <- as.date(database2[,2],origin="1899-12-30")   colnames(database2) <- c("price","date","key")   database2 <- as.data.frame(database2)    m1net_eb <- nplot(price ~ date, group = 'key', data = database2, type='multibarchart')   m1net_eb$chart(margin = list(left=60,bottom=110,right=60))   m1net_eb$chart(forcey = 0)   m1net_eb$set(linewidth = 1, width=1100 , height = 700)   m1net_eb  })  }  shinyapp(ui=ui, server=server) 

how reduce font size of tooltip in packdge? please help

just add

                          tags$head(tags$style(html("                                            .nvtooltip h3 {                                               font-size:14px;                                            }                                            "))) 

here full code.

library(shiny) library(rcharts) library(shinythemes) library(shinydashboard)  ui <- navbarpage(title = "information",                   tabpanel(title = "graph",                              fluidrow(                             column(2),                             column(8,                                    tags$br(),                                    tags$h5("chart", style="font-weight: bold; font-size:20px", align = "center"),                                    tags$br())                           ),                            fluidrow(                             column(1),                             column(8,                                    tags$br(),                                    tags$h5("exemple", style="font-weight: bold; font-size:14px", align = "center"),                                    tags$br(),                                    showoutput("bar","nvd3")),                              column(1)                           ),                            tags$head(tags$style(html("                                            .nvtooltip h3 {                                               font-size:14px;                                            }                                            ")))                    ) )  server <- function(input,output, session) {     output$bar <- renderchart2({      database2 <- cbind(cbind(c(100,110,140),c("2016-09-05","2016-09-05","2016-09-05")),c("product a","product b","product c"))     database2[,1] <- as.numeric(database2[,1])      database2[,2] <- as.date(database2[,2],origin="1899-12-30")     colnames(database2) <- c("price","date","key")     database2 <- as.data.frame(database2)      m1net_eb <- nplot(price ~ date, group = 'key', data = database2, type='multibarchart')     m1net_eb$chart(margin = list(left=60,bottom=110,right=60))     m1net_eb$chart(forcey = 0)     m1net_eb$set(linewidth = 1, width=1100 , height = 700)     m1net_eb    })  }  shinyapp(ui=ui, server=server) 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -