Announcement

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

    Timeline, wrong resolution

    Hi,

    I get trouble to get setResolution working correctly : the event are not draw to correct column (start and end)

    I want a timeline for a week (7 days) subdivided in 4 hours block (0-5:59, 6-11h59, 12-17:59, 18-23:59).

    Based on the example Calendar > Timeline resolution for hours subdivided in 15 minutes, i tried to use :
    Code:
    myTimeline.setResolution([{unit: "day"}, {unit:"hour"}], "day", 7, 6);
    The timeline display is correct but events are spanned over too much columns.
    Each columns are subdivided in 3, like in the Timeline Filtering example, but this only represents 20 minutes ! It should be 2 hours.

    At creatin time I use
    Code:
    headerLevels : [{
                unit : "week"
            }, {
                unit : "day"
            }
        ]
    and programaticaly change resolution by click on button.

    Thanks you for your help !

    v10.0p_2014-10-10/EVAL Development Only (expires 2014.12.09_06.39.23)

    #2
    You probably just need to set myTimeline.timelineGranularity to "hour"

    Comment


      #3
      I not sure to have correctly understood your answer.

      So I tried with
      Code:
      myTimeline.setResolution([{unit: "day"}, {unit:"hour"}], "hour", 168, 6);
      But I get same problem : each sub-column represent 20 minutes and not 2 hours.

      I tried to set "timelineGranularity" at init time but no success either.
      If I use the timeline resolutions provided in the example I have no problem. If I use my wanted resolution in the example I get the same behavior as in my app... so ?

      Thanks you

      Comment


        #4
        Can you rephrase?

        What do you mean by "sub-column"? Do you mean the eventSnapGap within each grid-column? Those would be 20px gaps, which happen to map to 20 minute intervals, if the column width is 60 and the inner granularity is "hour". So, it may be that you just want to set that value to 15 instead, which would give you 15 minute intervals.

        We have no idea why you're passing 168 in your most recent example, or how you think this code could show columns that represent 2 hours, when the granularity is "hour".

        Comment


          #5
          Perhaps I didn't understand what realy represents granularity ?

          And yes I think what I mean by sub-column is the eventSnapGap.

          Let me try to explain again:
          I want to get my timeline to show 7 days (one week Monday to Sunday), each days represented by 4 columns of 6 hours.

          I attached a screenshot to show you the problem, headers are corrects, the event is spanned on too much columns (it's a 3 hours event...).
          This screenshot is taken after :
          Code:
          myTimeline.setResolution([{unit: "day"}, {unit:"hour"}], "hour", 7, 6);
          Further in the timeline, the next events have are bound in the future...

          EDIT/ I use a Calendar to display events too, and they are correctly displayed. So events are correctly created.
          Attached Files
          Last edited by cedric_sis; 9 Nov 2014, 10:04. Reason: Add some informations

          Comment


            #6
            Thanks for the additional info - this was indeed a bug which has now been fixed.

            Your attempt at passing 168 and 6 should have worked, and will do so in builds dated November 11 and later.

            Comment


              #7
              Thanks for your support, I am happy that it's not my fault this time :)

              Comment


                #8
                After the update to the 11/11 nightly the issue is gone... with the events headers !

                I can see the CalendarEvent.name in the tooltip but the headers of canvas disapeared.

                I add that I use Calendar.nameField to map to the correct field ("title" in my datasource). It was working with the previous version of smartclient (10/10) and I changed nothing but the "ismorphic" directory in my app. I cleared cache of Firefox and tried with another browser (Chrome) too.

                Even if the default is true, I set Calendar.showEventHeaders to true, but headers still not shown.
                They have disapeared from Calendar too (not just from Timeline), and same in the Calendar/timeline examples of the sdk.

                Thanks

                Comment


                  #9
                  Sorry about that - this regression occurred on October 20 - it's been fixed for builds dated November 14 and later.

                  Comment


                    #10
                    Thank you.

                    Comment

                    Working...
                    X