设置“资源图表”视图中条形图的样式。
语法
expression。 ResourceGraphBarStyles( _TopLeftShowAs_, _TopLeftColor_, _TopLeftPattern_, _BottomLeftShowAs_, _BottomLeftColor_, _BottomLeftPattern_, _TopRightShowAs_, _TopRightColor_, _TopRightPattern_, _BottomRightShowAs_, _BottomRightColor_, _BottomRightPattern_, _ShowValues_, _ShowAvailabilityLine_, _PercentBarOverlap_, _ProposedLeftShowAs_, _ProposedLeftColor_, _ProposedLeftPattern_, _ProposedRightShowAs_, _ProposedRightColor_, _ProposedRightPattern_ )
expression:表示 Application 对象的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 说明 |
|---|---|---|---|
| TopLeftShowAs | 可选 | Integer | 过度分配的资源在 条形图样式对话框左上角中类别的条形图类型。 可以是下列的 PjResourceGraphStyle 常量之一: pjBar 、 pjArea 、 pjStep 、 pjLine 、 pjStepLine 或 pjDoNotShow 。 |
| TopLeftColor | 可选 | Integer | "条形图样式" 对话框左上角中过度分配资源类别的条形图颜色。 可以是 PjColor 常量之一。 |
| TopLeftPattern | 可选 | Integer | "条形图样式" 对话框左上角中过度分配资源类别的条形图图案。 可以是 PjResourceGraphPattern 常量之一。 |
| BottomLeftShowAs | 可选 | Integer | 条形图样式对话框中的已分配的资源类别 (左中部) 的条形图类型。 可以是 PjResourceGraphStyle 常量之一。 |
| BottomLeftColor | 可选 | Integer | 条形图样式对话框中的已分配的资源类别 (左中部) 的条形图颜色。 可以是 PjColor 常量之一。 |
| BottomLeftPattern | 可选 | Integer | 条形图样式对话框中的已分配的资源类别 (左中部) 的条形图图案。 可以是 PjResourceGraphPattern 常量之一。 |
| TopRightShowAs | 可选 | Integer | 过度分配的资源在 条形图样式对话框右上角中类别的条形图类型。 可以是 PjResourceGraphStyle 常量之一。 |
| TopRightColor | 可选 | Integer | 过度分配的资源在 条形图样式对话框右上角中类别的条形图颜色。 可以是 PjColor 常量之一。 |
| TopRightPattern | 可选 | Integer | 过度分配的资源在 条形图样式对话框右上角中类别的条形图图案。 可以是 PjResourceGraphPattern 常量之一。 |
| BottomRightShowAs | 可选 | Integer | 条形图样式对话框中的已分配的资源类别 (右中部) 的条形图类型。 可以是 PjResourceGraphStyle 常量之一。 |
| BottomRightColor | 可选 | Integer | 条形图样式对话框中的已分配的资源类别 (右中部) 的条形图颜色。 可以是 PjColor 常量之一。 |
| BottomRightPattern | 可选 | Integer | 条形图样式对话框中的已分配的资源类别 (右中部) 的条形图图案。 可以是 PjResourceGraphPattern 常量之一。 |
| ShowValues | 可选 | Boolean | 如此 如果相应的值显示在条形下。 |
| ShowAvailabilityLine | 可选 | Boolean | 如此 如果一条水平线显示在资源达到其最大可用性。 |
| PercentBarOverlap | 可选 | Integer | 介于 0 和 100 之间的数字,指定所显示条形图重叠百分比。 |
| ProposedLeftShowAs | 可选 | Integer | 在左下角的 条形图样式对话框中部分中的建议的预订类别的条形图类型。 可以是 PjResourceGraphStyle 常量之一。 |
| ProposedLeftColor | 可选 | Integer | 在左下角的 条形图样式对话框中部分中的建议的预订类别的条形图颜色。 可以是 PjColor 常量之一。 |
| ProposedLeftPattern | 可选 | Integer | 在左下角的 条形图样式对话框中部分中的建议的预订类别的条形图图案。 可以是 PjResourceGraphPattern 常量之一。 |
| ProposedRightShowAs | 可选 | Integer | 条形图样式对话框中右部分中建议的预订类别的条形图类型。 可以是 PjResourceGraphStyle 常量之一。 |
| ProposedRightColor | 可选 | Integer | 条形图样式对话框中右部分中建议的预订类别的条形图颜色。 可以是 PjColor 常量之一。 |
| ProposedRightPattern | 可选 | Integer | 条形图样式对话框中右部分中建议的预订类别的条形图图案。 可以是 PjResourceGraphPattern 常量之一。 |
返回值
Boolean
说明
使用 ResourceGraphBarStyles 方法,而不指定任何参数将显示 条形图样式对话框。
若要编辑资源图样式(其中的颜色可以指定为十六进制的 RGB 值),请使用 ResourceGraphBarStylesEx 方法。
示例
以下代码行将资源图表视图中建议的资源设置为蓝绿色的阶梯线划图形。
Application.ResourceGraphBarStylesEx ProposedRightShowAs:=pjStepLine, ProposedRightColor:=pjTeal
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。