简体   繁体   中英

Fix items on top of each other?

In my vis.js timeline some items get stack on top of each other so that I can't see the ones that's in the back. I have tried adding margin, but that just makes the other ones (that look good) get put further away from each other.

Is this a common problem and how do I fix it?

I have checked the docs, but can't find an answer. http://visjs.org/docs/timeline/

vis.js 项目堆叠在一起

For anyone else having the same problem, this is what I found.

  • If the item is range type, it needs to have an end value or else it won't stack.
  • I had to apply a maxHeight to the timeline options and had to set scrollVertical to true .

You can find more information about the configuration options here:
https://visjs.github.io/vis-timeline/docs/timeline/#Configuration_Options

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM