Labels in ASP.NET CORE Gantt component
3 Jan 20241 minute to read
The Gantt control maps any data source fields to task labels using the LabelSettings.LeftLabel
, LabelSettings.RightLabel
, and LabelSettings.TaskLabel
properties. You can customize the task labels with templates.
<ejs-gantt id='Gantt' dataSource="ViewBag.dataSource" height="450px">
<e-gantt-taskfields id="TaskId" name="TaskName" startDate="StartDate" endDate="EndDate" duration="Duration" progress="Progress" child="SubTasks">
</e-gantt-taskfields>
<e-gantt-labelSettings leftLabel="TaskId" rightLabel="Task Name: ${taskData.TaskName}" taskLabel="${Progress}%"></e-gantt-labelSettings>
</ejs-gantt>
public IActionResult Index()
{
ViewBag.DataSource = GanttData.ProjectNewData();
return View();
}