daattali / timevis

📅 Create interactive timeline visualizations in R
http://daattali.com/shiny/timevis-demo/
Other
653 stars 157 forks source link

How to use timevis with HTML ui? #23

Closed emillykkejensen closed 7 years ago

emillykkejensen commented 7 years ago

What should I include in to use timevis with HTML UI and what classes should I use?

daattali commented 7 years ago

I haven't tried - so I wouldn't know without spending some time trying it out. I assume it would work the same as including any other htmlwidget. If you've ever included a different htmlwidget and it worked fine, and timevis isn't working, then let me know. If you haven't done it with any, then perhaps this question should be asked on stackoverflow or somewhere else that's not specific to timevis

emillykkejensen commented 7 years ago

Thanks for the fast reply. I have included other htmlwidget, but for some reason this didn’t work like expected – however I did make it work in the end. What I need to include is these two css libraries:

<link href="vis-4.16.1/vis.min.css" rel="stylesheet" />
<link href="timeline-0.4/timevis.css" rel="stylesheet" />

And js libraries:

<script src="htmlwidgets-0.8/htmlwidgets.js"></script>
<script src="vis-4.16.1/vis.min.js"></script>
<script src="timevis-binding-0.4/timevis.js"></script>

Normally I would include both the css and js library in the head section of the html, but for some reason timevis only works, if I include the js part in the body section. Strange - maybe it’s my html theme that messes something up, but thought it would be nice to know for others, as it took me some time to get to.

daattali commented 7 years ago

That is very strange indeed. Thanks for letting me know On Jan 11, 2017 4:36 AM, "Emil Lykke Jensen" notifications@github.com wrote:

Closed #23 https://github.com/daattali/timevis/issues/23.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/daattali/timevis/issues/23#event-918819122, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6IFD8WoCTHtGYbi9K5bR6hTnu70K2vks5rRKKZgaJpZM4Lfepf .