No announcement yet.
  • Filter
  • Time
Clear All
new posts

  • Events on timeline overlap


    We are upgrading from version 5 to version 12 of smartgwt. We use the timeline to show events (activities), which connect exactly in time with a resolution of 1 second. In version 5, the events on the timeline stack neatly horizontally, in v12 with the same code, the events snap differently. This results in overlapping activities, with each only taking half of the bar. Please see the attached picture + code. The events do not overlap but due to snapping they are rendered as if they do. Can someone give a hint how to get them stacked horizontally as in v5?

    Click image for larger version

Name:	Timeline.png
Views:	1
Size:	23.5 KB
ID:	259208

  • #2
    If you can you show your timeline config, dataSource and a sample of data, we'll take a look.


    • #3
      I included the file in the original post, did you miss that, or do you need more than that?


      • #4
        Ah, yes, we see it now - we'll take a look and get back to you shortly


        • #5
          We've made a change to better deal with this - now, when the start of one event is the same datetime as the end of another, you'll see the behavior you expect. If the datetiems are different, even by a second, they will overlap, because that's how overlapping works. You should find that as of builds dated September 1.

          On your code-comment about eventSnapGap:

          1) call setEventSnapGap() in createTimeline(), before the call to setTimelineRange(), which calls setResolution() and creates the internals of the timeline
          2) since you're calling setResolution() yourself in downstream code, instead of setTimelineRange(), call setStartDate() and setEndDate(), and rely on your subsequent call to setResolution() for creation

          [Edit - note that we've also made a change to have eventSnapGap be writable after creation - so you can call setEventSnapGap() at any time, as long as you rebuild the timeline afterward, with a call to setResolution() or similar.]
          Last edited by Isomorphic; 2nd Sep 2019, 00:58.


          • #6
            Hi, this build is not available yet, right? last build is August 28th?


            • #7
              We had a problem with our internal build mechanism which is now fixed - you should see builds arrive tomorrow.


              • #8
                I do not see a new build yet, correct?


                • #9
                  The builds are working again now.