Announcement

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

    Timeline Resolution with Timeline grouping

    Hi,
    I'am using SGWT Pro 12.0 released Decembre 04, 2018.
    I have a timeline with Hours (1 day) Resolution but the resolution does not work correctly if it's lane gathered into collapsible groups.
    I include here an example of how it does not function.
    The code is based on your examples
    https://www.smartclient.com/smartgwt...eline_grouping
    and
    https://www.smartclient.com/smartgwt...ine_resolution

    Thanks a lot

    Code:
    HeaderLevel[] headerLevels = new HeaderLevel[] { new HeaderLevel(TimeUnit.DAY), new HeaderLevel(TimeUnit.HOUR) };
    
                // grouping fields must be specified as laneFields, but can be hidden as is done here  
                ListGridField groupField = new ListGridField("devGroup");  
                groupField.setHidden(true);  
                ListGridField[] laneFields = new ListGridField[]{  
                    new ListGridField("title", "Developer", 120),  
                    groupField  
                };  
    
                Timeline calendar = new Timeline();  
                calendar.setHeight(451);             
                calendar.setStartDate(RelativeDateItem.getAbsoluteDate(RelativeDate.TODAY));  
                calendar.setShowEventDescriptions(false);  
                calendar.setEventSnapGap(60);
                calendar.setLaneEventPadding(2); // add a little space around events            
    
                // grouping settings  
                calendar.setCanGroupLanes(true);  
                calendar.setLaneGroupByField("devGroup");  
                calendar.setLaneFields(laneFields);  
    
                // set up the grid   
                calendar.setHeaderLevels(headerLevels);
                calendar.setResolution(headerLevels, TimeUnit.HOUR, 24, null );
    
                calendar.setLanes(TimelineLaneData.getRecords());  
                calendar.setData(TimelineData.getRecords());  
    
    
    
                Timeline calendar1 = new Timeline();  
                calendar1.setHeight(451);
                calendar1.setStartDate(RelativeDateItem.getAbsoluteDate(RelativeDate.TODAY));
                calendar1.setShowEventDescriptions(false);  
                calendar1.setEventSnapGap(60);
                calendar1.setLaneEventPadding(2); // add a little space around events
    
             // set up the grid   
                calendar1.setHeaderLevels(headerLevels);
                calendar1.setResolution(headerLevels, TimeUnit.HOUR, 24, null );             
                calendar1.setLaneFields(laneFields);  
                calendar1.setLanes(TimelineLaneData.getRecords());  
                calendar1.setData(TimelineData.getRecords());



    #2
    We see no problems here.

    We ran yous sample code as presented, except that we called draw() on both timelines, and setTop() on the second one, so it didn't occlude the first one.

    What is it you were saying is an example of "how it does not function"?

    Please also retest with the latest build from smartclient.com/builds

    Comment


      #3
      Sorry. I didn't make that clear.
      In the drawing phase everything is displayed correctly, but when I change the date with the previous or next buttons the range resolution in timeline without grouping works fine instead in timeline with grouping shows a couple of days.
      Work fine:
      Click image for larger version

Name:	1_draw_ok.JPG
Views:	169
Size:	76.5 KB
ID:	256917

      Nex button, day and hour not working in timeline with grouping
      Click image for larger version

Name:	2_nextday_KO.JPG
Views:	176
Size:	85.4 KB
ID:	256915

      Re-next button day and hour not working in timeline with grouping
      Click image for larger version

Name:	3_nextday_KO.JPG
Views:	178
Size:	80.2 KB
ID:	256916

      I'am using SGWT Pro 12.0 released February 16, 2019
      Thanks
      Attached Files

      Comment


        #4
        Ah, ok - so, the effect is that only 23 hours are added instead of 24, right?

        We'll fix that for tomorrow's builds.

        Comment


          #5
          This turned out to be just a flawed visible-field count mechanism, which included the hidden grouping field, as if it were visible. Fixed for builds dated February 18 and later.

          Comment

          Working...
          X