Bars and Labels

Hi,

It seems that when you have a summary task and GanttBarStyle.RightField set, that the field will be displayed closer to the bar compared to child task, example:

Bar labels (10.6 KB)

in this example you can see summary task also has EndShape and that results in the label being very close to the bar. Can we somehow control spacing between bars and labels?

Project project = new Project();
var ganttChartView = (GanttChartView)project.Views.First(v => v.Name == "&Gantt Chart");

project.StartDate = new DateTime(2024, 2, 1, 0, 0, 0);
project.FinishDate = new DateTime(2024, 5, 20, 0, 0, 0);
SaveOptions options = new PdfSaveOptions()
{
    View = new ProjectView(new List<ViewColumn> { new GanttChartColumn ("Name", 200, Field.TaskName) })
};
project.CalculationMode = CalculationMode.None;

Aspose.Tasks.Task task = project.RootTask.Children.Add("Summary1");
task.Id = 1;
task.Start = new DateTime(2024,2,1,0,0,0);
task.Finish = new DateTime(2024,2,21,0,0,0);
Aspose.Tasks.Task subtask = task.Children.Add("Subtask1");
task.Id = 2;
subtask.Start = new DateTime(2024,2,1,0,0,0);
subtask.Finish = new DateTime(2024,2,20,0,0,0);

foreach(GanttBarStyle style in ganttChartView.BarStyles)
{
    style.RightField = Field.TaskName;
}


project.Save("CreateTasks_out.pdf", options);

In additions to that, a question. How does one remove all default BarStyles and then creates a bar like the SubTask1 in my sent example. By that i mean that one bar is full size and is filled from Task Start to Finish and another one is half the size of it and is on top of it defining progress of the task?

Thanks in advance.

@Herrington ,
we are analyzing this issue and request you to spare us little time. We will write back here soon to share the feedback.

@vasiliy.sinitsyn
Any updates regarding this?

@Herrington,

Gantt Chart bars rendering should be fixed on our side.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): TASKSNET-11240

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as TASKSNET-11240) have been fixed in this update.

Download