Announcement

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

    Timeline event being drawn at different day

    Using 5.0-p20150625 PowerEdition/Browser: Chrome
    We are using Timeline, but some events do not appear in the correct position. They are drawn in different days.
    ps. will work if setEventSnapGap(60), but we need to set it to 1

    Code:
    private Timeline createTimelineTest() {
    		Timeline timeline = new Timeline();
    		timeline.setWidth100();
    		timeline.setEventSnapGap(1);
    
    		HeaderLevel headerLevelWeek = new HeaderLevel(TimeUnit.WEEK);
    		HeaderLevel headerLevel2Day = new HeaderLevel(TimeUnit.DAY);
    		headerLevel2Day.setHeaderWidth(150);
    
    		HeaderLevel[] headerLevels = new HeaderLevel[] { headerLevelWeek, headerLevel2Day };
    		timeline.setHeaderLevels(headerLevels);
    
    		timeline.setTimelineRange(new Date(115, 6, 1, 0, 0, 0), new Date(115, 6, 5, 23, 59, 59));
    
    		CalendarEvent calendarEvent = new CalendarEvent(1, "7/1 11:00 - 7/2 17:00", "", new Date(115, 6, 1, 11, 0, 0),
    				new Date(115, 6, 2, 17, 0, 0), false, "", "1");
    		CalendarEvent[] calendarEvents = new CalendarEvent[] { calendarEvent };
    
    		Lane lane = new Lane("1", "Lane");
    		Lane[] laneArray = new Lane[] { lane };
    
    		timeline.setLaneFields(new ListGridField[] { new ListGridField("title", "Developer", 120) });
    		timeline.setLanes(laneArray);
    		timeline.setData(calendarEvents);
    
    		return timeline;
    	}
    Attached Files
    Last edited by zatix; 2 Jul 2015, 13:44. Reason: Didnt insert [CODE] and attachment

    #2
    We'll take a look.

    But note that you're not going to get sensible values for edit dates if you try to show 1-minute intervals in a timeline that shows "day" columns - your column is 150px wide, but there are 1440 minutes in a day....

    At the very best, drag-resizing an event will mean it ends up with some bizarre time-portion value, because there simply aren't enough pixels to express every minute in the day (its about 9.6 minutes per pixel).

    If you want to show a resoltion with 1-minute rendering, use an "hour" unit for your innermost headerLevel.
    Last edited by Isomorphic; 3 Jul 2015, 22:46.

    Comment


      #3
      We've made some changes to address this issue - that is, you will no longer see misplacement of events.

      However, as we already noted, it isn't possible to enforce a 1-minute snapGap in a 150px column that represents 1440 minutes.

      If you try to do that now, your snapGap value will be updated to the minimum sensible time value that can be represented by a single pixel - you will find the details of this override noted in the log.

      Comment


        #4
        Thank you Isomorphic,

        It worked!

        Comment


          #5
          Hello,

          The snapgap problem has been solved since 5.0-p20150725, but we are having some trouble with the last build.
          Filter in ListGrid since 5.0-p20150724 isn't working. No condition is being generated to the database. Is this a known issue?

          Comment

          Working...
          X