Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Gantt › resourceTimelineFormatFunction custom
- This topic has 4 replies, 3 voices, and was last updated 2 years ago by
c.ienco.
-
AuthorPosts
-
September 19, 2023 at 2:54 pm #108721
c.ienco
ParticipantHi, 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 2 years ago by
c.ienco.
September 19, 2023 at 5:24 pm #108727ivanpeevski
ParticipantHi 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 PeevskiSmart UI Team
https://www.htmlelements.com/September 20, 2023 at 7:28 am #108731c.ienco
ParticipantHi 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.
September 21, 2023 at 6:00 am #108740svetoslav_borislavov
ParticipantHi,
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 BorislavovSmart UI Team
https://www.htmlelements.com/September 26, 2023 at 7:18 am #108794c.ienco
ParticipantOk thank you.
-
This topic was modified 2 years ago by
-
AuthorPosts
- You must be logged in to reply to this topic.