Custom Time Markers for Gantt Charts

8 posts, 0 answers
  1. Mohomed
    Mohomed avatar
    22 posts
    Member since:
    Sep 2017

    Posted 13 Oct Link to this post

    Hi, The gantt charts have the default feature of displaying a red marker on top of the time slot for the current date/time. Is it possible to add this marker to any other time slot other than the current date ? Can anyone please provide an answer, because this feature is crucial for a project that I'm working on.
  2. Joana
    Admin
    Joana avatar
    134 posts

    Posted 17 Oct Link to this post

    Hi Mohomed,

    Have a look at this dojo: http://dojo.telerik.com/AsIPu/2 which shows the easiest way to change the the default behavior for rendering current time marker. The example is applicable for rendering only one time marker. If you need to show multiple markers, we will need to override the method responsible for rendering the time markers.

    Let me know if this fits your scenario.

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Mohomed
    Mohomed avatar
    22 posts
    Member since:
    Sep 2017

    Posted 17 Oct in reply to Joana Link to this post

    Hello Joana, Thank you for the reply. This is what I need, but I do need to include multiple markers on the same Gantt chart, how should I override the method as you mentioned ?
  4. Joana
    Admin
    Joana avatar
    134 posts

    Posted 17 Oct Link to this post

    Hi Mohamed,

    I have updated the dojo sample to fit the scenario with multiple markers: http://dojo.telerik.com/AsIPu/4

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Mohomed
    Mohomed avatar
    22 posts
    Member since:
    Sep 2017

    Posted 17 Oct in reply to Joana Link to this post

    Hello Joana, Thanks for the Demo. I tried it and there are few issues. The markers only appear correctly on the selected view. My selected view is the week view and the markers appear correctly, but on the day and month views the markers are on the wrong position. When I change the selected view to day, the markers appear correctly on this view but messed up in the other two views. This issue persists even on your Dojo demo, where the selected view is the day view and the markers appear perfectly on it. But on the week and month views the markers appear on the wrong time slots. Any idea why this happens ? 
  6. Mohomed
    Mohomed avatar
    22 posts
    Member since:
    Sep 2017

    Posted 17 Oct in reply to Mohomed Link to this post

    Hello Joana,

    I think the problem is that the markers' positions do not change dynamically when the view changes. If you count the number of time slots, you can figure that they remain the same for all the views. This should be the reason for this issue. Any ideas on how to change the slot positions dynamically to adjust to correct time slot ? 

  7. Joana
    Admin
    Joana avatar
    134 posts

    Posted 18 Oct Link to this post

    Hi Mohamed,

    In order to handle the markers' position when switching views we need to re-render them once the widget is dataBound. The issue stems from initialization of the markers before the new view is rendered and their position is incorrectly calculated. I have modify the dojo: http://dojo.telerik.com/AsIPu/6.

    I hope we've managed to fulfill the scenario.

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Mohomed
    Mohomed avatar
    22 posts
    Member since:
    Sep 2017

    Posted 18 Oct in reply to Joana Link to this post

    Thank you Joana, this works perfectly.
Back to Top