title | ms.service | ms.assetid | ms.date | ms.localizationpriority |
---|---|---|---|---|
Chart.HasAxis property (Project) |
project-server |
f1059a7e-01ac-cd41-78d6-dc88f52943f2 |
06/08/2017 |
medium |
Gets or sets which axes exist on a chart. Read/write Variant.
expression.HasAxis
expression A variable that represents a Chart object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
axisType | Required | Variant | The axis type. Series axes apply only to 3D charts. Can be one of the Office.XlAxisType constants. |
AxisGroup | Optional | Variant | The axis group. 3D charts have only one set of axes. Can be one of the Office.XlAxisGroup constants. |
Period
You must enter a value for at least one of the parameters when setting the HasAxis property.
Project may create or delete axes if you change the chart type or the IMsoAxis.AxisGroup, IMsoChartGroup.AxisGroup, or IMsoSeries.AxisGroup properties.
The following example turns on the primary value axis for the chart.
Sub SetPrimaryAxis()
Dim chartShape As Shape
Dim reportName As String
reportName = "Simple scalar chart"
Set chartShape = ActiveProject.Reports(reportName).Shapes(1)
chartShape.Chart.HasAxis(Office.XlAxisType.xlValue, Office.XlAxisType.xlPrimary) = True
End Sub
VARIANT
[!includeSupport and feedback]