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
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; }
Comment