Application.ResourceGraphBarStyles Method (Project)
Sets the styles of bars on the Resource Graph view.
Syntax
expression .ResourceGraphBarStyles(TopLeftShowAs, TopLeftColor, TopLeftPattern, BottomLeftShowAs, BottomLeftColor, BottomLeftPattern, TopRightShowAs, TopRightColor, TopRightPattern, BottomRightShowAs, BottomRightColor, BottomRightPattern, ShowValues, ShowAvailabilityLine, PercentBarOverlap, ProposedLeftShowAs, ProposedLeftColor, ProposedLeftPattern, ProposedRightShowAs, ProposedRightColor, ProposedRightPattern)
expression A variable that represents an Application object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
TopLeftShowAs |
Optional |
Integer |
The bar type for the overallocated resources category in the upper-left corner of the Bar Styles dialog box. Can be one of the following PjResourceGraphStyle constants: pjBar, pjArea, pjStep, pjLine, pjStepLine, or pjDoNotShow. |
TopLeftColor |
Optional |
Integer |
The bar color for the overallocated resources category in the upper-left corner of the Bar Styles dialog box. Can be one of the PjColor constants. |
TopLeftPattern |
Optional |
Integer |
The bar pattern for the overallocated resources category in the upper-left corner of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
BottomLeftShowAs |
Optional |
Integer |
The bar type for the allocated resources category (the middle left section) of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
BottomLeftColor |
Optional |
Integer |
The bar color for the allocated resources category (the middle left section) of the Bar Styles dialog box. Can be one of the PjColor constants. |
BottomLeftPattern |
Optional |
Integer |
The bar pattern for the allocated resources category (the middle left section) of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
TopRightShowAs |
Optional |
Integer |
The bar type for the overallocated resources category in the upper-right corner of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
TopRightColor |
Optional |
Integer |
The bar color for the overallocated resources category in the upper-right corner of the Bar Styles dialog box. Can be one of the PjColor constants. |
TopRightPattern |
Optional |
Integer |
The bar pattern for the overallocated resources category in the upper-right corner of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
BottomRightShowAs |
Optional |
Integer |
The bar type for the allocated resources category (the middle right section) of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
BottomRightColor |
Optional |
Integer |
The bar color for the allocated resources category (the middle right section) of the Bar Styles dialog box. Can be one of the PjColor constants. |
BottomRightPattern |
Optional |
Integer |
The bar pattern for the allocated resources category (the middle right section) of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
ShowValues |
Optional |
Boolean |
True if the corresponding values appear below the bars. |
ShowAvailabilityLine |
Optional |
Boolean |
True if a horizontal line appears where a resource reaches its maximum availability. |
PercentBarOverlap |
Optional |
Integer |
A number from 0 to 100 that specifies the overlap percentage of displayed bars. |
ProposedLeftShowAs |
Optional |
Integer |
The bar type for the proposed bookings category in the bottom left section of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
ProposedLeftColor |
Optional |
Integer |
The bar color for the proposed bookings category in the bottom left section of the Bar Styles dialog box. Can be one of the PjColor constants. |
ProposedLeftPattern |
Optional |
Integer |
The bar pattern for the proposed bookings category in the bottom left section of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
ProposedRightShowAs |
Optional |
Integer |
The bar type for the proposed bookings category in the bottom right section of the Bar Styles dialog box. Can be one of the PjResourceGraphStyle constants. |
ProposedRightColor |
Optional |
Integer |
The bar color for the proposed bookings category in the bottom right section of the Bar Styles dialog box. Can be one of the PjColor constants. |
ProposedRightPattern |
Optional |
Integer |
The bar pattern for the proposed bookings category in the bottom right section of the Bar Styles dialog box. Can be one of the PjResourceGraphPattern constants. |
Return Value
Boolean
Remarks
Using the ResourceGraphBarStyles method without specifying any arguments displays the Bar Styles dialog box.
To edit the resource graph styles where the colors can be specified as hexadecimal RGB values, use the ResourceGraphBarStylesEx method
Example
The following line of code sets proposed resources in the Resource Graph view as a step line in a blue-green color.
Application.ResourceGraphBarStylesEx ProposedRightShowAs:=pjStepLine, ProposedRightColor:=pjTeal