GroupingType Property

Microsoft Office Web Components Object Model

Show All

GroupingType Property

       

Returns or sets a ChartAxisGroupingEnum constant that represents whether or not the items on a chart axis are grouped, and if so, whether the grouping was done automatically. Read/write.

ChartAxisGroupingEnum can be one of these ChartAxisGroupingEnum constants.
chAxisGroupingAuto The Chart control chooses the grouping unit and type.
chAxisGroupingManual You will use the GroupingUnitType and GroupingUnit properties to perform the grouping.
chAxisGroupingNone Do not group the axis.

expression.GroupingType

expression   Required. An expression that returns a ChAxis object.

Remarks

The Chart control automatically creates a time scale and groups on the category axis when the following conditions are true:

  • The Chart control detects that the category information is a date.
  • The Chart control is bound to a PivotTable list, and the PivotTable list is not bound to an OLAP data source.

Example

This example disables time scaling on the category axis of the first chart in Chartspace1.

Sub DisableTimeScaling()

    Dim chConstants
    Dim axCategory

    Set chConstants = ChartSpace1.Constants

    ' Set a variable to the category axis.
    Set axCategory = ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionTimescale)

    ' Disable time scaling on the category axis.
    axCategory.GroupingType = chConstants.chAxisGroupingNone

End Sub