BarItemType Enumeration

Item type to change a bar style for.

Namespace:  Aspose.Tasks.Visualization
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public enum BarItemType
Members
  Member nameValueDescription
Task0 Indicates Task bar item type.
Summary1 Indicates Summary bar item type.
ProjectSummary2 Indicates Project summary bar item type.
ManualTask3 Indicates Manual task bar item type.
InactiveTask4 Indicates Inactive task bar item type.
CriticalTask5 Indicates Critical task bar item type.
Milestone6 Indicates Milestone task bar item type.
ManualSummary7 Indicates Manual summary bar item type.
Split8 Indicates Split bar item type.
ExternalTasks9 Indicates External tasks bar item type.
ExternalMilestone10 Indicates External milestone bar item type.
Deadline11 Indicates Deadline bar item type.
Progress12 Indicates Progress bar item type.
StartOnly13 Indicates Start-only bar item type.
FinishOnly14 Indicates Finish-only bar item type.
DurationOnly15 Indicates Duration-only bar item type.
InactiveMilestone16 Indicates Inactive milestone bar item type.
InactiveSummary17 Indicates Inactive summary bar item type.
SummaryRollup18 Summary rollup bar item type.
Examples
Shows how to customize task bars by using <see cref="Aspose.Tasks.Visualization.BarStyle" />s.
var project = new Project();

var task1 = project.RootTask.Children.Add("Task 1");
var task2 = project.RootTask.Children.Add("Task 2");

task1.Set(Tsk.Duration, project.GetDuration(1, TimeUnitType.Day));
task2.Set(Tsk.Duration, project.GetDuration(1, TimeUnitType.Day));

project.TaskLinks.Add(task1, task2, TaskLinkType.FinishToStart);

var task3 = project.RootTask.Children.Add("Task 3");
var rsc1 = project.Resources.Add("Resource 1");
var rsc2 = project.Resources.Add("Resource 2");
var rsc3 = project.Resources.Add("Resource 3");

project.ResourceAssignments.Add(task1, rsc1);
project.ResourceAssignments.Add(task2, rsc2);
project.ResourceAssignments.Add(task3, rsc3);

SaveOptions options = new PdfSaveOptions
{
    Timescale = Timescale.ThirdsOfMonths
};

var style = new BarStyle
                {
                    ItemType = BarItemType.CriticalTask,
                    LeftBarTextConverter = delegate(Task t)
                    {
                        return string.Format("This task (ID = {0}) is on critical path", t.Get(Tsk.Id));
                    }
                };

var style2 = new BarStyle { BarColor = Color.DarkOrchid, ItemType = BarItemType.Task };

options.BarStyles = new List<BarStyle> { style, style2 };

project.Save(OutDir + "CustomizeTextWithTaskBars_out.pdf", options);
See Also