JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Gantt resourceTimelineFormatFunction custom

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #108721
    c.ienco
    Participant

    Hi, I’m trying to customize the appearance of the resource timeline cells. I’m trying to use the resourceTimelineFormatFunction callback, at the end of the doc I can read
    “Another usage of this callback is to customize the timeline resource representation completely if resourceTimelineMode is set to custom.”

    I was looking for a working example in the demos, but the combination of attributes that I need as I understund is resourceTimelineMode = “custom” and resourceTimelineView = “custom” is impossible to find and I was not able to get it work as I wanted. Can you please give me a working example? I’m just trying to extend the actual diagram view, with the yellow color in addition to red and green for some particular cases.

    • This topic was modified 7 months, 2 weeks ago by c.ienco.
    #108727
    ivanpeevski
    Participant

    Hi c.ienco,

    There is currently an issue with using resourceTimelineFormatFunction when resourceTimelineMode  is set to “custom”, which we are working to resolve for our next release.

    For now, you can consider using the “load” CSS attribute to customize the cells. For example:

    .smart-resource-timeline-view-cell[load=”9/10″]::after{

    background: orange;

    }

     

     

    Best Regards,
    Ivan Peevski

    Smart UI Team
    https://www.htmlelements.com/

     

    #108731
    c.ienco
    Participant

    Hi ivanpeevski, thank you for your answer. The problem is that I need to apply different colors dynamically on each cell, which are based on some data that I calculate at runtime. Is there a way to retrieve the current cell in the resourceTimelineFormatFunction (or somewhere else) and change its style? I just need to add the yellow color since the green and red cells are correctly rendered at the moment using the standard behaviour of the library with resourceTimelineMode set to diagram.

    #108740

    Hi,

    This will be available after the fix of the problem.
    We are very sorry for the inability to use this functionality now.
    Meanwhile, if you have any questions, do not hesitate to contact us!

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #108794
    c.ienco
    Participant

    Ok thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.