Partager via


Chart.ChartWizard Method

Modifies the properties of the given chart. You can use this method to quickly format a chart without setting all the individual properties. This method is non-interactive, and it changes only the specified properties.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub ChartWizard ( _
    Source As Object, _
    Gallery As Object, _
    Format As Object, _
    PlotBy As Object, _
    CategoryLabels As Object, _
    SeriesLabels As Object, _
    HasLegend As Object, _
    Title As Object, _
    CategoryTitle As Object, _
    ValueTitle As Object, _
    ExtraTitle As Object _
)
'Usage
Dim instance As Chart
Dim Source As Object
Dim Gallery As Object
Dim Format As Object
Dim PlotBy As Object
Dim CategoryLabels As Object
Dim SeriesLabels As Object
Dim HasLegend As Object
Dim Title As Object
Dim CategoryTitle As Object
Dim ValueTitle As Object
Dim ExtraTitle As Object

instance.ChartWizard(Source, Gallery, _
    Format, PlotBy, CategoryLabels, SeriesLabels, _
    HasLegend, Title, CategoryTitle, _
    ValueTitle, ExtraTitle)
void ChartWizard(
    Object Source,
    Object Gallery,
    Object Format,
    Object PlotBy,
    Object CategoryLabels,
    Object SeriesLabels,
    Object HasLegend,
    Object Title,
    Object CategoryTitle,
    Object ValueTitle,
    Object ExtraTitle
)

Parameters

  • Source
    Type: System.Object
    The range that contains the source data for the new chart. If this argument is omitted, Microsoft PowerPoint edits the active chart sheet or the selected chart on the active worksheet.
  • Format
    Type: System.Object
    The option number for the built-in autoformats. Can be a number from 1 through 10, depending on the gallery type. If this argument is omitted, Microsoft PowerPoint chooses a default value based on the gallery type and data source.
  • CategoryLabels
    Type: System.Object
    An integer that specifies the number of rows or columns within the source range that contains category labels. Allowed values are from 0 (zero) through one less than the maximum number of the corresponding categories or series.
  • SeriesLabels
    Type: System.Object
    An integer that specifies the number of rows or columns within the source range that contains series labels. Allowed values are from 0 (zero) through one less than the maximum number of the corresponding categories or series.
  • CategoryTitle
    Type: System.Object
    The category axis title text.
  • ExtraTitle
    Type: System.Object
    The series axis title for 3-D charts or the second value axis title for 2-D charts.

Remarks

If the Source parameter is omitted and the selection is not a chart on the active document, this method fails and an error occurs.

See Also

Reference

Chart Interface

Chart Members

Microsoft.Office.Interop.PowerPoint Namespace