Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

252
Vistas
R rhandsontable cambia el borde de la celda en el renderizador

Tengo una breve pregunta sobre (r)handsontable. ¿Es posible cambiar los bordes de las celdas usando el parámetro renderer de la función hot_col ? Traté de encontrar algo equivalente a td.style.background , pero no encontré nada en Google. Probé cosas como td.style.border pero no funcionó...

Si alguien tiene la respuesta, se lo agradecería!

Gracias por adelantado

 library(shiny) library(rhandsontable) ui <- fluidPage( rHandsontableOutput('table') ) server <- function(input, output) { df <- data.frame(alphabet = letters[1:10], include = TRUE, include2 = FALSE) output$table <- rhandsontable::renderRHandsontable({ col_highlight <- 2 rhandsontable(df, height = 500) %>% hot_col(col_highlight, renderer = " function (instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.CheckboxRenderer.apply(this, arguments); var col_value = instance.getData()[row][1] if ( col_value ) { td.style.background = '#C3FA9A'; } if ( !col_value) { td.style.background ='#ff4d4d' }}") })} shinyApp(ui, server)
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

La propiedad CSS es backgroundColor :

 output$table <- rhandsontable::renderRHandsontable({ col_highlight <- 2 rhandsontable(df, height = 500) %>% hot_col( col_highlight, renderer = " function (instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.CheckboxRenderer.apply(this, arguments); var col_value = instance.getData()[row][1]; td.style.backgroundColor = col_value ? 'red': 'green'; td.style.borderStyle = 'solid'; td.style.borderWidth = col_value ? '2px' : '4px'; td.style.borderColor = col_value ? 'yellow' : 'crimson'; }" ) })
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda