daattali/timevis

horizontalScroll

renatocava opened this issue · 2 comments

Hi,

I am trying to add the horizontalScroll option but I am not successful, do you know if it is possible? have you tried it?

image

https://visjs.github.io/vis-timeline/docs/timeline/#Configuration_Options

Thanks!

Usually when a parameter doesn't seem to work, it's because the version of visjs used in this package doesn't yet have that parameter implemented. This package is using a 4 year old version of visjs (because of various issues I still can't update to a newer one but I would love to at some point, see #50 for context) so you'll have to find the documentation of visjs for that version and see if it had this parameter.

This should now work if you use the latest timevis version from github.

timevis(
  data.frame(
    id = 1:2,
    content = c("one", "two"),
    start = c("2020-01-10", "2020-01-11")
  ), 
  options = list(horizontalScroll = TRUE, zoomable = FALSE)
)