Series.XValues Property (PowerPoint)
Returns or sets an array of x values for a chart series. Read/write Variant.
Version Information
Version Added: PowerPoint 2007
Syntax
expression .XValues
expression A variable that represents a Series object.
Remarks
You can set the XValues property to a range on a worksheet or to an array of values, but not to a combination of both.
For PivotChart reports, this property is read-only.
Example
Note
Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.
The following example sets the values from a range address.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SeriesCollection(1).XValues = "=Sheet1!B1:B5"
End If
End With
Note
Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.
To assign a constant value to each individual data point, you must use an array, as shown in the following example.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SeriesCollection(1).XValues = _
Array(5.0, 6.3, 12.6, 28, 50)
End If
End With