Our state of the art Gantt chart


Post by agarcia »

Hi,
I'm trying to change o the fly the avatars of the resourceassigment column.

Is it possible to switch between names and avatrs? if so, could you tell me how can apply it?

Thank you in advance


Post by tasnim »

Yes, Of course. You could use https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-resources to set new data of resources

Here is a gif of the output

Attachments
chrome_KwOxAdPuyg.gif
chrome_KwOxAdPuyg.gif (875.8 KiB) Viewed 95 times

Post by agarcia »

Thank you Tasnim.
My question was more about the way the resources are displayed on the column cell. In your example I see how you change the resources data dynamicaly, but the resources are always displayed as avatar (Image). What I would like to do is just to change the way the resources are displayed on the cells. Removing the images and getting the names, and then return to the avatar images.

How I could do that?

Thank you


Post by tasnim »

Hello,

Then you could set image or imageUrl in the resource to null.

gantt.project.resourceStore.forEach(item => { item.image = null; });

https://bryntum.com/products/gantt/docs/api/Gantt/model/ResourceModel#field-image
https://bryntum.com/products/gantt/docs/api/Gantt/model/ResourceModel#field-imageUrl

Is this what you're looking for

Attachments
chrome_0AFCpNGEzf.gif
chrome_0AFCpNGEzf.gif (1.5 MiB) Viewed 89 times

Post by agarcia »

Thank Tasnim,
I will test this out.

Have a nice day


Post Reply