title | ms.service | ms.assetid | ms.date | ms.localizationpriority |
---|---|---|---|---|
Chart.ApplyCustomType method (Project) |
project-server |
2bfe88c2-198e-a039-ace6-4ba362ce09d6 |
06/08/2017 |
medium |
Applies a custom chart type to a chart.
expression. ApplyCustomType
(ChartType, TypeName)
expression A variable that represents a Chart object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
ChartType | Required | Office.XlChartType | The type of chart. |
TypeName | Optional | Variant | The name of the chart type. |
ChartType | Required | XLCHARTTYPE | |
TypeName | Optional | Variant |
Nothing
The following example changes the chart type to a clustered 3D bar chart.
Sub SetChartType()
Dim chartShape As Shape
Dim reportName As String
reportName = "Simple scalar chart"
Set chartShape = ActiveProject.Reports(reportName).Shapes(1)
Debug.Print "Chart type before: " & chartShape.Chart.ChartType
chartShape.Chart.ApplyCustomType (xl3DBarClustered)
Debug.Print "Chart type after: " & chartShape.Chart.ChartType
End Sub
[!includeSupport and feedback]