Skip to content

Latest commit

 

History

History
69 lines (38 loc) · 1.58 KB

Project.chart.hasaxis.md

File metadata and controls

69 lines (38 loc) · 1.58 KB
title ms.service ms.assetid ms.date ms.localizationpriority
Chart.HasAxis property (Project)
project-server
f1059a7e-01ac-cd41-78d6-dc88f52943f2
06/08/2017
medium

Chart.HasAxis property (Project)

Gets or sets which axes exist on a chart. Read/write Variant.

Syntax

expression.HasAxis

expression A variable that represents a Chart object.

Parameters

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.

Return value

Period

Remarks

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.

Example

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

Property value

VARIANT

See also

Chart Object

[!includeSupport and feedback]