Skip to content

Instantly share code, notes, and snippets.

@aarong1
Created November 23, 2021 18:50
Show Gist options
  • Save aarong1/7c2c9681116cf858ebebe63e17c54245 to your computer and use it in GitHub Desktop.
Save aarong1/7c2c9681116cf858ebebe63e17c54245 to your computer and use it in GitHub Desktop.
code snippet so that all sparklines can be displayed on all pages of a DT
code snippet to get sparklines to render on all pages of a datable
options = list(
fnDrawCallback = htmlwidgets::JS(
'
function(){options = list(
fnDrawCallback = htmlwidgets::JS(
function(){
HTMLWidgets.staticRender();
}
'
)
from this stack overflow question:
https://stackoverflow.com/questions/47041415/include-sparkline-htmlwidget-in-datatable-cells-in-a-shiny-app-without-resortin
HTMLWidgets.staticRender();
}
'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment