Private Sub Form_Load()
With MSChart1
.chartType = VtChChartType2dPie
For i = 1 To 3
.Row = 1
.Column = i
.Data = i * 100
Next
With .DataGrid
.RowLabelCount = 1
.ColumnCount = 3
.RowCount = 1
For i = 1 To .ColumnCount
.ColumnLabel(i, 1) = "Column " & i
Next i
.RowLabel(1, 1) = "Data as a Percentage"
End With
For i = 1 To .Plot.SeriesCollection.Count
With .Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeOutside
.Component = VtChLabelComponentPercent
.PercentFormat = "0%"
.VtFont.Size = 10
End With
Next i
End With
End Sub