ComponentOne Chart 8.0 for ActiveX
The Chart Styles Collection

 

The Chart Styles Collection

The ChartStyles collection contains the ChartStyle objects defined for each series. The following methods are defined for the ChartStyles collection:

Add(index)

Add a new ChartStyle object to the collection.

Remove(index)

Remove a ChartStyle object from the collection.

Normally, you will not need to add or remove ChartStyle objects from the collection yourself. If a ChartStyle object already exists when its corresponding series is created, the previously created ChartStyle object is used to display the data in this series.

By looping through the ChartStyles collection, you can quickly change the behavior of all of the lines or points in a chart. For example, the following code lightens all of the points in a chart whenever the mouse is clicked:

Private Sub Chart2D1_Click()

       Dim Style As Object
       For Each Style in Chart2D1.ChartGroups(1).Styles
              Style.Shape.Color = Style.Shape.Color + &H50505
       Next Style

End Sub

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback