Shape of a marker at the beginning or end of the bar style to be rendered when saving view data to some of
SaveFileFormat.
Namespace:
Aspose.Tasks.Visualization
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
Members|
| Member name | Value | Description |
|---|
| None | 0 |
Indicates None shape.
|
| VerticalLine | 1 |
Indicates Vertical line shape.
|
| Pentagon | 2 |
Indicates Pentagon shape.
|
| Triangle | 3 |
Indicates Triangle shape.
|
| LeftBracket | 4 |
Indicates Left bracket shape.
|
| RightBracket | 5 |
Indicates Right bracket shape.
|
| ArrowDown | 6 |
Indicates ArrowDown shape.
|
| LeftFade | 7 |
Indicates Left fade shape.
|
| RightFade | 8 |
Indicates Right fade shape.
|
| Diamond | 9 |
Indicates Diamond shape.
|
ExamplesShows how to use custom bar styles.
var project = new Project(DataDir + "Project2.mpp");
SaveOptions options = new PdfSaveOptions
{
BarStyles = new List<BarStyle>()
};
var style = new BarStyle();
style.ItemType = BarItemType.Milestone;
style.BarColor = Color.Green;
style.BarShape = BarShape.HalfHeight;
style.StartShape = Shape.LeftBracket;
style.StartShapeColor = Color.Aqua;
style.EndShape = Shape.RightBracket;
style.EndShapeColor = Color.Aquamarine;
style.TextStyle = new TextStyle();
style.TextStyle.BackgroundColor = Color.Black;
style.LeftBarTextConverter = task =>
{
if (!task.Get(Tsk.Name).StartsWith("T"))
{
task.Set(Tsk.Name, "T" + task.Get(Tsk.Name));
}
return task.Get(Tsk.Name);
};
options.BarStyles.Add(style);
project.Save(OutDir + "WorkWithBarStyle_out.mpp", options);
See Also