htmlwidgets / sparkline

jQuery Sparkline HTML Widget for R
Other
244 stars 40 forks source link

Add helper functions to add sparkline dependencies #19

Closed timelyportfolio closed 7 years ago

timelyportfolio commented 7 years ago

Similar to #18 but a different piece of the process. When we include sparkline in tags or htmlwidgets, such as formattable or DT. I believe the helper function should behave differently for tags and htmlwidgets instead of converting all htmlwidgets to tags.

tags

use htmltools::attachDependencies to add sparkline dependencies

htmlwidgets

add sparkline dependencies to the dependency list in htmlwidget$dependencies