Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

How to add a gap between time nodes ? #4222

Open
leon-qr-li opened this issue Jan 10, 2019 · 3 comments
Open

How to add a gap between time nodes ? #4222

leon-qr-li opened this issue Jan 10, 2019 · 3 comments

Comments

@leon-qr-li
Copy link

I'm investigating if we can use vis.js to add a gap between two time nodes. Please see screenshot as an example. I want to hide time between 17:00 pm - 9:00 am (the next day) daily, and add a grey bar before the segment. So I need to create a gap between the 17:00 and 9:00 nodes. is there a way we could do that ?

capture

@javdome
Copy link

javdome commented Jan 10, 2019

Check the option hiddenDates in docs: http://visjs.org/docs/timeline/#Configuration_Options

For the grey bar, you can try the CSS style classes: Hours or Grouped hours (http://visjs.org/docs/timeline/#Styles)

@leon-qr-li
Copy link
Author

Check the option hiddenDates in docs: http://visjs.org/docs/timeline/#Configuration_Options

For the grey bar, you can try the CSS style classes: Hours or Grouped hours (http://visjs.org/docs/timeline/#Styles)

Hi javdome, thanks for the reply. :)

I am using the hiddenDates to hide the time but what I actually need is that small gap between 17:00 p.m. and 9 a.m. and gap stay the same width in any zoom-in level. hiddenDates will only hide the time / date, I am kind of need a small space to represent the hidden time duration and make the bar fit in that space. (please see the screenshot above)

@jgorene
Copy link

jgorene commented Jan 22, 2019

@leon-qr-li Hello, as far as I know, it doesn't seem possible to do this, mainly to keep the same gap regardless of zoom level.
Maybe see on this long discussion (feature request) that may seem similar to your request...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants