CategoryScale Object Example

The following example sets the scaling attributes for a category axis.

Private Sub Command1_Click()
   ' Sets scaling attributes for a category axis.
   MSChart1.ChartType = VtChChartType2dLine
   With MSChart1.Plot.Axis(VtChAxisIdX)
      .ValueScale.MajorDivision = 10
      .ValueScale.MinorDivision = 5
      .CategoryScale.Auto = False          ' Sets manual scaling.
      .CategoryScale.DivisionsPerLabel = 2 ' Label appears every two
                                           ' divisions.
      .CategoryScale.DivisionsPerTick = 2  ' Ticks appear every two
                                           ' divisions.
      .CategoryScale.LabelTick = True   ' Labels displayed on top of
                                       ' Tick marks.
   End With
End Sub