Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!