Datatable with formatStyle in markdown: print with colors.

datatable
css
#1

Hi!

---
title: "Dynamic report"
output: 
  html_document
---

# TEST
<button id="btn", onclick="myFunction()">Print</button>

```{r}
library(DT)
datatable(mtcars) %>%
      formatStyle("cyl",  backgroundColor = styleEqual(c(4, 6, 8), c("blue", "darkorange", "red")))

I'm trying to print page from browser with window.print () or browser -> print.
I do not get formatting on print.
I suspect, that's because of bootstrap css @media print settings.
How can I get correct image with formatting?
I can not use extention print because I need full page with other graphics and texts.

0 Likes

closed #2

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes