Our state of the art Gantt chart


Post by swapnakonakanchi »

Hi Team,

How to show the the task name on task bar as below attachment. please provide sample code.

Thank you.

Attachments
headermenu.png
headermenu.png (17.52 KiB) Viewed 88 times

Post by mats »


Post by swapnakonakanchi »

Thanks mats, What is the stringHelper in above given sample code. how to import it in react typescript.

import { Gantt, StringHelper } from '../../build/gantt.module.js?468079';

Post by tasnim »

Hi,

StringHelper is a helper for string manipulation
https://bryntum.com/products/gantt/docs/api/Core/helper/StringHelper

Here is how you could import it in react typescript

import { StringHelper, TaskModel } from '@bryntum/gantt';

// config
    taskRenderer({ taskRecord } : { taskRecord : TaskModel }) {
        if (taskRecord.isLeaf && !taskRecord.isMilestone) {
            return StringHelper.encodeHtml(taskRecord.name);
        }
    }

Post by swapnakonakanchi »

Thank you Tasnim. It works fine.


Post Reply